/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50724
 Source Host           : localhost:3306
 Source Schema         : lmterp_open

 Target Server Type    : MySQL
 Target Server Version : 50724
 File Encoding         : 65001

 Date: 28/07/2021 10:59:06
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for account
-- ----------------------------
DROP TABLE IF EXISTS `account`;
CREATE TABLE `account` (
  `account_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '账号id',
  `platform_id` int(11) NOT NULL COMMENT '平台id',
  `username` varchar(128) NOT NULL DEFAULT '' COMMENT '账号',
  `store_name` varchar(255) NOT NULL DEFAULT '' COMMENT '店铺名称',
  `site` varchar(255) NOT NULL DEFAULT '' COMMENT '站点，多个使用英文逗号隔开',
  `tax_num` varchar(128) NOT NULL DEFAULT '' COMMENT '税号',
  `send_day` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '发货天数',
  `sort` smallint(5) NOT NULL DEFAULT '0' COMMENT '排序',
  `is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '账号状态，1：正常，0：禁用',
  `token` json DEFAULT NULL COMMENT '平台密钥信息，json格式',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`account_id`) USING BTREE,
  UNIQUE KEY `account_username` (`username`,`platform_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='账号表';

-- ----------------------------
-- Records of account
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for account_platform
-- ----------------------------
DROP TABLE IF EXISTS `account_platform`;
CREATE TABLE `account_platform` (
  `platform_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '平台名称',
  `name_ch` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '中文名称',
  `code` char(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '平台编号',
  `site` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '平台官网',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用，1启用，0关闭',
  `api_base_url` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'api请求地址基础URL，多个使用英文逗号隔开',
  `develop_url` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '开发手册链接',
  `classes` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '对接类',
  `sort` smallint(5) NOT NULL DEFAULT '0' COMMENT '排序',
  `remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`platform_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='平台表';

-- ----------------------------
-- Records of account_platform
-- ----------------------------
BEGIN;
INSERT INTO `account_platform` VALUES (1, 'Allegro', '波兰Allegro', 'AGR', '', 1, 'https://api.allegro.pl', 'https://developer.allegro.pl/en/documentation/', 'AllegroService', 0, '', '2020-08-19 19:36:27', '2020-09-17 18:56:26');
INSERT INTO `account_platform` VALUES (2, 'Blibli', '印尼Blibli', 'BLI', '', 1, 'https://api.blibli.com/v2', 'https://seller-api.blibli.com/docs/sections/60/contents/2867?title=introduction', 'BlibliService', 0, '', '2020-08-20 19:06:07', '2020-09-17 15:05:35');
INSERT INTO `account_platform` VALUES (3, 'Coupang', '韩国Coupang', 'CUP', '', 1, 'https://api-gateway.coupang.com/v2', 'https://developers.coupang.com/hc/en-us/articles/360033877853-Product-Creation', 'CoupangService', 0, '', '2020-08-21 19:47:35', '2020-09-17 15:05:35');
INSERT INTO `account_platform` VALUES (4, 'Cdiscout', '法国CD', 'CDT', '', 1, 'https://wsvc.cdiscount.com', 'https://dev.cdiscount.com/marketplace/?page_id=128', 'CdiscountService', 123, '', '2020-08-24 11:48:38', '2020-12-16 16:55:21');
INSERT INTO `account_platform` VALUES (5, 'Eprice', '意大利Eprice', 'EPE', '', 1, 'https://marketplace.eprice.it', 'https://marketplace.eprice.it/help/topics/home_pages/seller_connectors_api.htm', 'EpriceService', 0, '开发文档需要登录', '2020-08-24 19:54:18', '2020-09-17 15:05:36');
INSERT INTO `account_platform` VALUES (6, 'Joom', '俄罗斯Joom', 'JOM', '', 1, 'https://api-merchant.joom.com/api/v2', 'https://www.showdoc.com.cn/186698173532010?page_id=1069681597490866', 'JoomService', 0, '', '2020-08-25 14:37:31', '2020-09-17 15:05:37');
INSERT INTO `account_platform` VALUES (7, 'Lazada', '东南亚Lazada', 'LZA', '', 1, 'https://api.lazada.com.ph/rest,https://api.lazada.com.my/rest,https://api.lazada.co.th/rest,https://api.lazada.sg/rest,https://api.lazada.co.id/rest,https://api.lazada.vn/rest', 'https://open.lazada.com/doc/api.htm?spm=a2o9m.11193487.0.0.3ac413feHAnzbS#/api?cid=8&path=/orders/get', 'LazadaService', 0, '', '2020-08-26 12:53:06', '2020-08-26 12:53:06');
INSERT INTO `account_platform` VALUES (8, 'Newegg', '新蛋', 'NEG', '', 1, 'https://api.newegg.com', 'https://developer.newegg.com/newegg_marketplace_api/', 'NeweggService', 0, '', '2020-08-26 15:18:22', '2020-08-26 15:18:22');
INSERT INTO `account_platform` VALUES (9, 'Rakuten', '乐天', 'RKT', '', 1, 'http://webservice.rakuten.de', 'http://webservice.rakuten.de/documentation/method/get_orders', 'RakutenDEService', 0, '德国乐天', '2020-08-27 09:18:10', '2020-08-27 09:18:10');
INSERT INTO `account_platform` VALUES (10, 'Real', '德国Real', 'REA', '', 1, 'https://www.real.de', 'https://www.real.de/api/v1/?page=orders#retrieving-orders', 'RealService', 0, '', '2020-08-27 10:55:31', '2020-08-27 10:55:31');
INSERT INTO `account_platform` VALUES (11, 'Shopee', '虾皮', 'SHE', '', 1, 'https://partner.shopeemobile.com', 'https://open.shopee.com/documents', 'ShopeeService', 0, '东南亚', '2020-08-27 13:47:05', '2020-08-27 13:47:05');
INSERT INTO `account_platform` VALUES (12, 'Worten', '葡萄牙Worten', 'WTN', '', 1, 'https://marketplace.worten.pt', 'https://marketplace.worten.pt', '', 0, '开发文档需要登录才能查看', '2020-08-27 15:13:33', '2020-08-27 15:13:33');
INSERT INTO `account_platform` VALUES (13, 'Amazon', '亚马逊', 'AMZ', '', 1, 'https://mws.amazonservices.de', 'http://docs.developer.amazonservices.com/zh_CN/orders/2013-09-01/Orders_ListOrders.html', 'AmazonService', 0, '亚马逊欧洲站', '2020-08-27 16:59:35', '2020-08-27 16:59:35');
INSERT INTO `account_platform` VALUES (14, 'Aliexpress', '速卖通', 'SMT', '', 1, 'http://gw.api.alibaba.com/openapi', 'http://gw.api.alibaba.com/dev/doc/intl/api.htm?ns=aliexpress.open&n=api.findOrderListQuery&v=1', '', 0, '', '2020-08-27 17:00:49', '2020-10-19 21:07:17');
INSERT INTO `account_platform` VALUES (15, 'Mercadolibre', '美客多', 'MCD', '', 1, 'https://api.mercadolibre.com', 'https://developers.mercadolivre.com.br/en_us/authentication-and-authorization', '', 0, '', '2020-08-27 17:03:36', '2020-08-27 17:03:36');
COMMIT;

-- ----------------------------
-- Table structure for account_platform_warn
-- ----------------------------
DROP TABLE IF EXISTS `account_platform_warn`;
CREATE TABLE `account_platform_warn` (
  `warn_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `platform_id` int(10) unsigned NOT NULL COMMENT '平台id',
  `wrod` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '关键词',
  `type` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0禁用，5品牌，10警告',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`warn_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='平台禁用关键词';

-- ----------------------------
-- Records of account_platform_warn
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for account_settings
-- ----------------------------
DROP TABLE IF EXISTS `account_settings`;
CREATE TABLE `account_settings` (
  `settings_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `account_id` int(11) unsigned NOT NULL COMMENT '账号id',
  `is_auto_sync` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否开启自动同步，1：是，0否',
  `hours` smallint(3) unsigned NOT NULL DEFAULT '1' COMMENT '多少小时自动同步',
  `auto_sync_hours` tinyint(2) unsigned DEFAULT '1' COMMENT '自动同步多少小时前的订单数据，开启自动同步生效',
  `status` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '状态，0：未同步，5：同步中，10：同步成功，15：同步失败',
  `start_sync_time` datetime DEFAULT NULL COMMENT '开始同步时间',
  `finish_sync_time` datetime DEFAULT NULL COMMENT '同步完成时间',
  `last_sync_time` datetime DEFAULT NULL COMMENT '最后一次同步时间',
  `remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `error_count` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '错误次数',
  `error_msg` text COMMENT '错误信息',
  PRIMARY KEY (`settings_id`) USING BTREE,
  UNIQUE KEY `account_id_index` (`account_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='数据同步配置表';

-- ----------------------------
-- Records of account_settings
-- ----------------------------
BEGIN;
INSERT INTO `account_settings` VALUES (1, 1, 0, 1, 5, 10, '2020-09-21 22:31:40', '2020-09-21 22:32:58', '2020-09-21 22:31:40', '', '2020-09-18 09:22:44', '2020-09-18 09:22:44', 0, NULL);
INSERT INTO `account_settings` VALUES (2, 2, 1, 1, 1, 5, '2020-10-09 17:30:32', '2020-09-21 21:30:49', '2020-10-09 17:30:32', 'aaaaaaaaaaaaaaaaaa', '2020-09-17 20:48:58', '2020-09-17 20:48:58', 0, NULL);
INSERT INTO `account_settings` VALUES (4, 9, 1, 1, 50, 10, '2020-09-21 22:31:51', '2020-09-21 22:31:55', '2020-09-21 22:31:51', 'aaaaaaaaaaaaaaaaaa', '2020-09-17 21:19:29', '2020-09-17 21:19:29', 0, NULL);
INSERT INTO `account_settings` VALUES (5, 5, 0, 1, 1, 0, NULL, NULL, NULL, 'aaaaaaaaaaaaaaaaaa', '2020-09-17 21:19:34', '2020-09-17 21:19:34', 0, NULL);
INSERT INTO `account_settings` VALUES (18, 18, 0, 1, 7, 15, NULL, NULL, NULL, '', '2020-09-18 09:25:44', '2020-09-18 09:25:44', 0, NULL);
INSERT INTO `account_settings` VALUES (19, 19, 0, 1, 1, 5, '2020-09-21 22:28:20', NULL, '2020-09-21 22:28:20', '', '2020-09-18 09:30:13', '2020-09-18 09:30:13', 0, NULL);
INSERT INTO `account_settings` VALUES (22, 22, 1, 1, 1, 5, '2020-10-28 12:56:50', NULL, '2020-10-28 12:56:50', '', '2020-10-19 22:13:45', '2020-10-19 22:13:45', 0, NULL);
COMMIT;

-- ----------------------------
-- Table structure for account_sync_log
-- ----------------------------
DROP TABLE IF EXISTS `account_sync_log`;
CREATE TABLE `account_sync_log` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '日志id',
  `account_id` int(11) unsigned NOT NULL COMMENT '账号id',
  `sync_start_time` int(11) unsigned NOT NULL COMMENT '开始同步时间',
  `sync_finish_time` int(11) unsigned NOT NULL COMMENT '同步完成时间',
  `params` varchar(1024) NOT NULL DEFAULT '' COMMENT '同步参数',
  `error_msg` text COMMENT '错误信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=219 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='账号同步日志';

-- ----------------------------
-- Records of account_sync_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `username` varchar(32) NOT NULL DEFAULT '' COMMENT '用户名',
  `nickname` varchar(20) NOT NULL DEFAULT '' COMMENT '昵称',
  `password` varchar(255) NOT NULL DEFAULT '' COMMENT '密码',
  `face` varchar(64) NOT NULL DEFAULT '0',
  `token` varchar(32) NOT NULL DEFAULT '' COMMENT 'token',
  `login_times` int(10) NOT NULL DEFAULT '0' COMMENT '登录次数',
  `last_login_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后一次登录时间',
  `last_login_ip` varchar(16) NOT NULL DEFAULT '' COMMENT '上次登陆ip',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '0-禁用 1-正常',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='后台管理员表';

-- ----------------------------
-- Records of admin
-- ----------------------------
BEGIN;
INSERT INTO `admin` VALUES (1, 'admin', 'admin', '$2y$10$yC/BqKoxi2mhMIrPcyfhE.4kphrDgNhq9ri5f60ZwQSihIhsdLIeK', '/uploads/image/20180425/f31867256aa9ed55be32422a7bb5119a.gif', '9ff81c213618f19f1f86fcaca665612e', 763, '2021-01-15 21:23:46', '127.0.0.1', 1, '2021-01-10 21:00:15');
INSERT INTO `admin` VALUES (2, 'manager', '管理员', '$2y$10$U.ejJiTGH4hPzSZx/4MKa.z7rx7MASFHzZYp4GjhiyrcmtZjoEI02', '/uploads/image/20200918/cc812d10f97bde01d079f1723e6da307.jpg', 'dbb1aeb695c58ee99c8caa61d414e740', 221, '2021-07-27 17:24:33', '127.0.0.1', 1, '2021-01-10 21:00:15');
INSERT INTO `admin` VALUES (3, 'test', 'abc', 'dsfds', '0', 'fda', 0, '2021-01-15 21:23:46', '', 1, '2021-01-10 21:00:15');
INSERT INTO `admin` VALUES (4, 'aaaa', 'tttt', 'dsfds', '0', 'fda', 0, '2021-01-15 21:23:46', '', 1, '2021-01-10 21:00:15');
COMMIT;

-- ----------------------------
-- Table structure for auth_group
-- ----------------------------
DROP TABLE IF EXISTS `auth_group`;
CREATE TABLE `auth_group` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL DEFAULT '',
  `title` varchar(32) NOT NULL DEFAULT '' COMMENT '组名',
  `rules` text COMMENT '规则ID',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `sort` smallint(5) NOT NULL DEFAULT '0',
  `remark` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='分组表';

-- ----------------------------
-- Records of auth_group
-- ----------------------------
BEGIN;
INSERT INTO `auth_group` VALUES (1, 'super admin', '超级管理员', '*', 1, 0, '');
INSERT INTO `auth_group` VALUES (2, 'admin', '管理员', '1,90,104,112,151,117,120,121,123,124,125,126,127,208,152,153,154,155,156,157,118,128,119,122,129,130,131,142,139,140,141,146,143,144,145,150,147,148,149,398,403,404,405,406,407,402,399,400,401,132,133,134,135,136,207,348,322,323,324,325,334,335,336,331,332,333,317,318,319,320,321,359,326,327,328,329,330,314,274,275,276,315,345,316,346,338,347,309,310,312,313,337,296,300,297,298,299,301,302,303,304,305,306,307,308,389,339,340,344,341,342,343,362,363,365,265,266,267,268,269,382,381,383,384,385,91,92,103,356,388,390,93,94,95,96,97,354,353,355,102,378,379,210,227,247,391,392,393,394,395,396,397,408,107,108,98,349,350,351,352,105,187,289,290,291,188,211,216,179,180,181,182,175,99,176,177,178,183,184,185,186,106,113,357,380,386,206,209,217,218,219,221,222,223,224,225,228,249,270,271,272,358,360,361,279,280,281,282,288,283,284,285,286,287,226,277,278,212,213,214,215,248,109,114,231,232,234,235,236,233,237,238,239,241,240,242,243,244,245,246,111,115,366,367,368,387,110,116,250,251,292,293,294,295,256,257,258,259,260,261,262,263,264,252,253,254,255,2,5,6,7,9,10,16,4,83,85,158,159,160,161,162,169,167,164,165,168,170,173,171,172,174,202,369,373,370,371,372,377,374,375,376,192,196,193,194,195,198,199,200,201,3,11,13,14,15,17,19,20,21,22,23,24,26,27,28,29,30,189,190,191,86,87,88,89', 1, 0, '最高权限管理员');
INSERT INTO `auth_group` VALUES (4, 'test', '测试组', '1,90,104,112,151,120,121,123,124,125,126,127,208,152,153,154,155,156,157,118,128,119,146,143,144,145,132,133,134,135,136,207,322,325,334,335,336,331,332,333,317,318,319,320,321,359,326,327,328,329,330,314,274,275,276,315,345,316,346,338,347,309,310,312,313,337,296,300,297,298,299,301,302,303,304,305,306,307,308,389,339,340,344,341,342,343,362,363,365,265,266,267,268,269,382,381,383,384,385', 1, 0, '测试组');
COMMIT;

-- ----------------------------
-- Table structure for auth_group_access
-- ----------------------------
DROP TABLE IF EXISTS `auth_group_access`;
CREATE TABLE `auth_group_access` (
  `access_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uid` int(10) unsigned NOT NULL COMMENT '会员ID',
  `group_id` int(10) unsigned NOT NULL COMMENT '组ID',
  PRIMARY KEY (`access_id`) USING BTREE,
  UNIQUE KEY `uid_group_id` (`uid`,`group_id`) USING BTREE,
  KEY `uid` (`uid`) USING BTREE,
  KEY `group_id` (`group_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='权限分组表';

-- ----------------------------
-- Records of auth_group_access
-- ----------------------------
BEGIN;
INSERT INTO `auth_group_access` VALUES (1, 1, 1);
INSERT INTO `auth_group_access` VALUES (2, 2, 2);
INSERT INTO `auth_group_access` VALUES (3, 2, 4);
COMMIT;

-- ----------------------------
-- Table structure for auth_rule
-- ----------------------------
DROP TABLE IF EXISTS `auth_rule`;
CREATE TABLE `auth_rule` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(10) unsigned NOT NULL,
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '规则名称',
  `title` varchar(50) NOT NULL DEFAULT '' COMMENT '规则标题',
  `icon` varchar(50) NOT NULL DEFAULT '' COMMENT '图标',
  `condition` varchar(255) NOT NULL DEFAULT '' COMMENT '条件',
  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
  `is_menu` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否为菜单',
  `sort` int(10) NOT NULL COMMENT '权重',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name` (`name`,`title`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=409 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='节点表';

-- ----------------------------
-- Records of auth_rule
-- ----------------------------
BEGIN;
INSERT INTO `auth_rule` VALUES (1, 0, '/index/index', '首页', 'fa-dashboard', '', '', 1, 100, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (2, 0, '/system/config', '系统管理', 'fa-cogs', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (3, 2, '/auth/admin', '权限管理', 'fa-sitemap', '', '', 1, -7, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (4, 2, '/system/config/group', '系统设置', 'fa-cog', '', '配置项快速设置', 1, 90, 1, '2021-01-11 10:16:01', '2021-04-02 15:54:09');
INSERT INTO `auth_rule` VALUES (5, 2, '/system/config/index', '配置管理', 'fa-magic', '', '用于管理一些字典数据,通常以键值格式进行录入,程序将解析成相应的类型', 1, 100, 1, '2021-01-11 10:16:01', '2021-04-02 15:54:03');
INSERT INTO `auth_rule` VALUES (6, 5, '/system/config/add', '添加配置', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (7, 5, '/system/config/edit', '修改配置', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (9, 5, '/system/config/sort', '快速排序', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (10, 5, '/system/config/lock', '状态锁定', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (11, 3, '/auth/admin/index', '后台用户管理', 'fa-user', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (13, 11, '/auth/admin/add', '添加用户', '', '', '该权限包含分配用户组', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (14, 11, '/auth/admin/edit', '修改用户', '', '', '该权限包含分配用户组', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (15, 11, '/auth/admin/delete', '删除用户', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (16, 5, '/system/config/delete', '删除配置', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (17, 3, '/auth/group/index', '用户组管理', 'fa-users', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (19, 17, '/auth/group/add', '添加角色', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (20, 17, '/auth/group/edit', '修改角色', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (21, 17, '/auth/group/sort', '排序', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (22, 17, '/auth/group/delete', '删除', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (23, 17, '/auth/group/assigned', '分配权限', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (24, 3, '/auth/rule/index', '规则&菜单', 'fa-child', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (26, 24, '/auth/rule/add', '添加规则', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (27, 24, '/auth/rule/edit', '修改规则', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (28, 24, '/auth/rule/sort', '快速排序', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (29, 24, '/auth/rule/delete', '删除', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (30, 24, '/auth/rule/menu', '设置菜单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (83, 2, '/user/index', '用户管理', 'fa-users', '', '', 1, 80, 1, '2021-01-11 10:16:01', '2021-04-02 15:54:30');
INSERT INTO `auth_rule` VALUES (85, 83, '/user/set_status', '状态设置', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (86, 0, '/info/user', '个人中心', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (87, 86, '/info/update_nickname', '修改昵称', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (88, 86, '/info/update_face', '修改头像', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (89, 86, '/user/update_password', '修改密码', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (90, 1, '/public/logout', '退出', '', '', '', 0, 10, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (91, 0, '/order/manager', '订单', '', '', '', 1, 80, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (92, 91, '/order/manager/index', '订单管理', 'fa-shopping-bag', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-04-12 17:56:44');
INSERT INTO `auth_rule` VALUES (93, 92, '/order/manager/delete', '删除订单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (94, 92, '/order/manager/save', '更新订单备注', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (95, 92, '/order/manager/import', '导入订单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (96, 92, '/order/manager/export', '导出订单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (97, 92, '/order/manager/look', '订单详情', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (98, 0, '/cha/order/index', '物流', '', '', '', 1, 70, 1, '2021-01-11 10:16:01', '2021-02-05 11:56:44');
INSERT INTO `auth_rule` VALUES (99, 175, '/cha/channel/channel_list', '获取渠道', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (102, 92, '/order/manager/question', '异常订单', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (103, 92, '/order/manager/index', '订单列表', '', '', '', 1, 10, 1, '2021-01-11 10:16:01', '2021-04-12 17:56:49');
INSERT INTO `auth_rule` VALUES (104, 0, '/wms/product', '商品', '', '', '', 1, 90, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (105, 98, '/cha/order/index', '渠道管理', 'fa-plane', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-04-15 14:35:14');
INSERT INTO `auth_rule` VALUES (106, 0, '/pur/purchase', '采购', '', '', '', 1, 50, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (107, 0, '/pub/publish/index', '刊登', '', '', '', 1, 75, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (108, 107, '/pub/publish/coupang', 'Coupang', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (109, 0, '/cus/emailcate', '客服', '', '', '', 1, 40, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (110, 0, '/cra/index', '采集', '', '', '', 1, 30, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (111, 0, '/report/index/order', '报表', '', '', '', 1, 35, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (112, 104, '/wms/product/index', '商品管理', 'fa-cubes', '', '', 1, 100, 1, '2021-01-11 10:16:01', '2021-04-12 17:29:29');
INSERT INTO `auth_rule` VALUES (113, 106, '/pur/purchase/index', '采购列表', 'fa-shopping-cart', '', '', 1, 90, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (114, 109, '/cus/customer/index', '客服列表', 'fa-users', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (115, 111, '/report/index/order', '图表', 'fa-bar-chart', '', '', 1, 100, 1, '2021-01-11 10:16:01', '2021-04-01 14:15:41');
INSERT INTO `auth_rule` VALUES (116, 110, '/cra/index/index', '采集管理', 'fa-internet-explorer', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (117, 151, '/wms/product/add', '添加商品', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-16 20:58:30');
INSERT INTO `auth_rule` VALUES (118, 104, '/wms/category', '商品分类', 'fa-paw', '', '', 1, 90, 1, '2021-01-11 10:16:01', '2021-02-17 16:07:18');
INSERT INTO `auth_rule` VALUES (119, 128, '/wms/category/category', '获取分类', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (120, 151, '/wms/product/getskus', '自动生成SKU', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-16 20:58:21');
INSERT INTO `auth_rule` VALUES (121, 151, '/wms/product/save', '保存商品', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-16 20:58:12');
INSERT INTO `auth_rule` VALUES (122, 128, '/wms/category/getTree', '树形菜单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (123, 151, '/wms/product/export', '导出商品', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-16 20:58:37');
INSERT INTO `auth_rule` VALUES (124, 151, '/wms/product/import', '导入商品', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-16 20:58:44');
INSERT INTO `auth_rule` VALUES (125, 151, '/wms/product/delete', '删除商品', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-16 20:58:51');
INSERT INTO `auth_rule` VALUES (126, 151, '/wms/product/look', '商品详情', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-16 20:58:58');
INSERT INTO `auth_rule` VALUES (127, 151, '/wms/product/update', '修改商品状态', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-16 20:59:04');
INSERT INTO `auth_rule` VALUES (128, 118, '/wms/category/index', '分类列表', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (129, 128, '/wms/category/add', '添加分类', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (130, 128, '/wms/category/delete', '删除分类', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (131, 128, '/wms/category/save', '更新分类', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (132, 104, '/wms/warehouse/', '仓库', 'fa-home', '', '', 1, 85, 1, '2021-01-11 10:16:01', '2021-02-17 16:05:26');
INSERT INTO `auth_rule` VALUES (133, 132, '/wms/warehouse/index', '仓库管理', '', '', '', 1, 110, 1, '2021-01-11 10:16:01', '2021-02-18 19:30:50');
INSERT INTO `auth_rule` VALUES (134, 133, '/wms/warehouse/add', '添加仓库', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (135, 133, '/wms/warehouse/delete', '删除仓库', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (136, 133, '/wms/warehouse/save', '更新仓库', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (139, 142, '/wms/spec/save', '更新规格', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (140, 142, '/wms/spec/delete', '删除规格', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (141, 142, '/wms/spec/add', '添加规格', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (142, 118, '/wms/spec/index', '规格列表', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (143, 146, '/wms/unit/save', '更新计量单位', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (144, 146, '/wms/unit/delete', '删除计量单位', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (145, 146, '/wms/unit/add', '添加计量单位', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (146, 118, '/wms/unit/index', '计量单位', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (147, 150, '/wms/brand/save', '更新品牌', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (148, 150, '/wms/brand/delete', '删除品牌', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (149, 150, '/wms/brand/add', '添加品牌', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (150, 118, '/wms/brand/index', '品牌列表', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-02-17 16:03:32');
INSERT INTO `auth_rule` VALUES (151, 112, '/wms/product/index', '商品列表', '', '', '', 1, 50, 1, '2021-01-11 10:16:01', '2021-04-12 17:29:21');
INSERT INTO `auth_rule` VALUES (152, 112, '/wms/platform/index', '平台SKU', '', '', '', 1, 40, 1, '2021-01-11 10:16:01', '2021-01-16 20:56:59');
INSERT INTO `auth_rule` VALUES (153, 152, '/wms/platform/generatesku', '生成平台SKU', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (154, 152, '/wms/platform/export', '导出平台SKU', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (155, 152, '/wms/platform/delete', '删除平台SKU', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (156, 152, '/wms/platform/import', '导入平台SKU', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (157, 152, '/wms/platform/readd', '再次生成', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (158, 2, '/system/account', '店铺管理', 'fa-recycle', '', '', 1, 70, 1, '2021-01-11 10:16:01', '2021-04-02 15:54:34');
INSERT INTO `auth_rule` VALUES (159, 158, '/system/platform/index', '平台管理', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (160, 159, '/system/platform/save', '保存平台', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (161, 159, '/system/platform/delete', '删除平台', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (162, 159, '/system/platform/add', '添加平台', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (164, 167, '/system/account/save', '保存账号', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (165, 167, '/system/account/delete', '删除账号', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (167, 158, '/system/account/index', '账号管理', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (168, 167, '/system/account/add', '添加账号', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (169, 159, '/system/platform/lock', '平台状态', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (170, 167, '/system/account/lock', '账号状态', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (171, 173, '/system/settings/save', '保存账号同步配置', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (172, 173, '/system/settings/delete', '删除账号同步配置', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (173, 158, '/system/settings/index', '账号同步配置管理', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (174, 173, '/system/settings/add', '添加账号同步配置', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (175, 105, '/cha/carrier/index', '承运商列表', '', '', '', 1, 5, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (176, 175, '/cha/carrier/add', '添加承运商', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (177, 175, '/cha/carrier/delete', '删除承运商', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (178, 175, '/cha/carrier/save', '更新承运商', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (179, 105, '/cha/channel/index', '渠道列表', '', '', '', 1, 90, 1, '2021-01-11 10:16:01', '2021-04-12 18:00:07');
INSERT INTO `auth_rule` VALUES (180, 179, '/cha/channel/add', '添加渠道', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (181, 179, '/cha/channel/delete', '删除渠道', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (182, 179, '/cha/channel/save', '更新渠道', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (183, 98, '/cha/sender/index', '发件人管理', 'fa-user', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-04-12 18:00:40');
INSERT INTO `auth_rule` VALUES (184, 183, '/cha/sender/add', '添加发件人', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (185, 183, '/cha/sender/delete', '删除发件人', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (186, 183, '/cha/sender/save', '更新发件人', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (187, 105, '/cha/order/index', '订单列表', '', '', '', 1, 100, 1, '2021-01-11 10:16:01', '2021-04-12 17:59:58');
INSERT INTO `auth_rule` VALUES (188, 187, '/cha/order/delete', '删除渠道订单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (189, 2, '/system/trash/index', '回收站列表', 'fa-trash', '', '', 1, -90, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (190, 189, '/system/trash/delete', '删除回收站', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (191, 189, '/system/trash/recover', '恢复回收站数据', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (192, 2, '/system/country/index', '国家管理', 'fa-globe', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (193, 196, '/system/country/save', '更新国家', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (194, 196, '/system/country/delete', '删除国家', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (195, 196, '/system/country/add', '添加国家', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (196, 192, '/system/country/index', '国家列表', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (198, 192, '/system/exchange/index', '汇率列表', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (199, 198, '/system/exchange/save', '更新汇率', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (200, 198, '/system/exchange/delete', '删除汇率', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (201, 198, '/system/exchange/add', '添加汇率', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (202, 173, '/system/settings/sync_order', '同步订单', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (206, 113, '/pur/purchase/add', '添加采购单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (207, 133, '/wms/warehouse/get', '获取仓库数据', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (208, 151, '/wms/product/get', '获取商品', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-16 20:59:11');
INSERT INTO `auth_rule` VALUES (209, 113, '/pur/purchase/delete', '删除采购单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (210, 92, '/order/manager/import_platform_order', '导入平台表格订单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (211, 187, '/cha/order/cancel', '取消预报', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (212, 106, '/pur/producer/index', '供应商列表', 'fa-th-large', '', '', 1, 20, 1, '2021-01-11 10:16:01', '2021-04-12 18:02:42');
INSERT INTO `auth_rule` VALUES (213, 212, '/pur/producer/add', '添加供应商', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (214, 212, '/pur/producer/delete', '删除供应商', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (215, 212, '/pur/producer/save', '更新供应商', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (216, 187, '/cha/order/label', '获取面单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (217, 113, '/pur/purchase/check', '审核采购单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (218, 113, '/pur/purchase/info', '查看采购单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (219, 113, '/pur/purchase/upload', '上传合同发票', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (221, 113, '/pur/purchase/business', '采购下单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (222, 113, '/pur/purchase/tracknum', '上传追踪号', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (223, 113, '/pur/purchase/exchange', '创建退货单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (224, 113, '/pur/purchase/exsave', '保存退货单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (225, 113, '/pur/purchase/excheck', '审核退货单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (226, 106, '/pur/exception/index', '采购异常', 'fa-exclamation-triangle', '', '', 1, 50, 1, '2021-01-11 10:16:01', '2021-04-12 18:02:59');
INSERT INTO `auth_rule` VALUES (227, 92, '/order/manager/batch_print', '批量打印面单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (228, 113, '/pur/purchase/cancel', '取消采购单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (231, 109, '/cus/emailcate', '邮件', 'fa-envelope', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (232, 231, '/cus/emailcate/index', '分类列表', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-04-23 14:09:19');
INSERT INTO `auth_rule` VALUES (233, 231, '/cus/emailtemp/index', '模板列表', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (234, 232, '/cus/emailcate/add', '添加分类', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (235, 232, '/cus/emailcate/delete', '删除分类', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (236, 232, '/cus/emailcate/save', '更新分类', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (237, 233, '/cus/emailtemp/add', '添加模板', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (238, 233, '/cus/emailtemp/delete', '删除模板', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (239, 233, '/cus/emailtemp/save', '更新模板', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (240, 231, '/cus/emailtemp/show_var', '模板变量', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (241, 233, '/cus/emailtemp/copy', '复制邮件模板', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (242, 109, '/cus/black/index', '黑名单', 'fa-user-times', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (243, 242, '/cus/black/add', '添加黑名单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (244, 242, '/cus/black/delete', '删除黑名单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (245, 242, '/cus/black/save', '更新黑名单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (246, 242, '/cus/black/push', '通过订单号添加黑名单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (247, 92, '/order/invoice/render', '生成发票', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (248, 212, '/pur/producer/get', '获取供应商', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (249, 113, '/pur/purchase/dopayment', '采购申请付款', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (250, 0, '/fac/cash/index', '财务', '', '', '', 1, 30, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (251, 250, '/fac/cash/index', '收款单', 'fa-paw', '', '', 1, 100, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (252, 250, '/fac/bank/index', '银行列表', 'fa-university', '', '', 1, 80, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (253, 252, '/fac/bank/add', '添加银行', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (254, 252, '/fac/bank/delete', '删除银行', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (255, 252, '/fac/bank/save', '更新银行', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (256, 250, '/fac/payment/index', '付款单', 'fa-credit-card', '', '', 1, 90, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (257, 256, '/fac/payment/info', '付款详情', '', '', '', 0, 0, 1, '2021-01-11 17:57:48', '2021-01-11 17:57:59');
INSERT INTO `auth_rule` VALUES (258, 256, '/fac/payment/upload', '上传附件', '', '', '', 0, 0, 1, '2021-01-12 19:57:54', '2021-01-12 19:57:54');
INSERT INTO `auth_rule` VALUES (259, 256, '/fac/payment/save', '保存付款单', '', '', '', 0, 0, 1, '2021-01-12 20:22:35', '2021-01-12 20:22:35');
INSERT INTO `auth_rule` VALUES (260, 256, '/fac/payment/check', '审核付款单', '', '', '', 0, 0, 1, '2021-01-14 20:47:10', '2021-01-14 20:47:10');
INSERT INTO `auth_rule` VALUES (261, 250, '/fac/invoice/index', '发票配置', 'fa-ticket', '', '', 1, 80, 1, '2021-01-11 10:16:01', '2021-04-12 19:29:46');
INSERT INTO `auth_rule` VALUES (262, 261, '/fac/invoice/add', '添加发票配置', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (263, 261, '/fac/invoice/delete', '删除发票配置', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (264, 261, '/fac/invoice/save', '更新发票配置', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (265, 365, '/wms/pmbarcode/index', '平台条码', '', '', '', 1, 30, 1, '2021-01-11 10:16:01', '2021-04-19 14:10:11');
INSERT INTO `auth_rule` VALUES (266, 265, '/wms/pmbarcode/save', '更新平台条码', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (267, 265, '/wms/pmbarcode/delete', '删除平台条码', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (268, 265, '/wms/pmbarcode/add', '添加平台条码', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (269, 265, '/wms/pmbarcode/merge', '合并平台条码', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (270, 106, '/pur/track/index', '采购追踪号', 'fa-plane', '', '', 1, 80, 1, '2021-01-11 10:16:01', '2021-01-18 17:38:48');
INSERT INTO `auth_rule` VALUES (271, 270, '/pur/track/info', '追踪号详情', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (272, 270, '/pur/track/upload', '上传追踪号', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (274, 314, '/wms/recv/purchase', '采购单', '', '', '', 1, 0, 1, '2021-01-19 16:59:29', '2021-02-17 16:04:51');
INSERT INTO `auth_rule` VALUES (275, 274, '/wms/recv/purchase_recv', '采购收货明细', '', '', '', 0, 0, 1, '2021-01-19 17:04:04', '2021-01-19 17:04:04');
INSERT INTO `auth_rule` VALUES (276, 274, '/wms/recv/purchase_batch', '采购批量收货', '', '', '', 0, 0, 1, '2021-01-19 17:05:07', '2021-01-19 17:05:07');
INSERT INTO `auth_rule` VALUES (277, 226, '/pur/exception/solve', '处理异常', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (278, 226, '/pur/exception/info', '异常详情', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (279, 106, '/pur/exchange/index', '采购换货', 'fa-exchange', '', '', 1, 70, 1, '2021-01-11 10:16:01', '2021-04-12 18:02:53');
INSERT INTO `auth_rule` VALUES (280, 279, '/pur/exchange/info', '换货详情', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (281, 279, '/pur/exchange/add', '添加换货单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (282, 279, '/pur/exchange/check', '审核换货单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (283, 106, '/pur/return/index', '采购退货', 'fa-backward', '', '', 1, 60, 1, '2021-01-11 10:16:01', '2021-04-12 18:02:57');
INSERT INTO `auth_rule` VALUES (284, 283, '/pur/return/info', '退货详情', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (285, 283, '/pur/return/add', '添加退货单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (286, 283, '/pur/return/check', '审核退货单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (287, 283, '/pur/return/cancel', '取消退货', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-23 16:36:08');
INSERT INTO `auth_rule` VALUES (288, 279, '/pur/exchange/cancel', '取消换货', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (289, 187, '/cha/order/info', '查看物流详情', '', '', '', 0, 0, 1, '2021-01-26 15:11:00', '2021-01-26 15:11:00');
INSERT INTO `auth_rule` VALUES (290, 187, '/cha/order/track', '同步物流信息', '', '', '', 0, 0, 1, '2021-01-26 18:00:46', '2021-01-26 18:00:46');
INSERT INTO `auth_rule` VALUES (291, 187, '/cha/order/order', '同步物流到订单', '', '', '', 0, 0, 1, '2021-02-01 13:51:54', '2021-02-01 13:51:54');
INSERT INTO `auth_rule` VALUES (292, 251, '/fac/cash/info', '收款详情', '', '', '', 0, 0, 1, '2021-01-11 17:57:48', '2021-01-11 17:57:59');
INSERT INTO `auth_rule` VALUES (293, 251, '/fac/cash/upload', '上传附件', '', '', '', 0, 0, 1, '2021-01-12 19:57:54', '2021-01-12 19:57:54');
INSERT INTO `auth_rule` VALUES (294, 251, '/fac/cash/save', '保存收款单', '', '', '', 0, 0, 1, '2021-01-12 20:22:35', '2021-01-12 20:22:35');
INSERT INTO `auth_rule` VALUES (295, 251, '/fac/cash/check', '审核收款单', '', '', '', 0, 0, 1, '2021-01-14 20:47:10', '2021-01-14 20:47:10');
INSERT INTO `auth_rule` VALUES (296, 104, '/wms/wstock/index', '库存管理', 'fa-database', '', '', 1, 50, 1, '2021-02-08 19:13:57', '2021-04-01 11:01:21');
INSERT INTO `auth_rule` VALUES (297, 296, '/wms/wstock/save', '编辑库存', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (298, 296, '/wms/wstock/add', '添加库存', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (299, 296, '/wms/wstock/log', '库存日志', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-02-09 16:54:40');
INSERT INTO `auth_rule` VALUES (300, 296, '/wms/wstock/index', '库存列表', '', '', '', 1, 20, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (301, 296, '/wms/wcheck/index', '库存盘点', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-02-17 15:44:40');
INSERT INTO `auth_rule` VALUES (302, 301, '/wms/wcheck/save', '保存盘点单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (303, 301, '/wms/wcheck/add', '添加盘点单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (304, 301, '/wms/wcheck/check', '审核盘点单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (305, 301, '/wms/wcheck/take', '盘点库存', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (306, 301, '/wms/wcheck/index', '盘点单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (307, 301, '/wms/wcheck/take_save', '保存盘点库存', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (308, 301, '/wms/wcheck/info', '查看盘点单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (309, 104, '/wms/wup', '待上架', 'fa-hashtag', '', '', 1, 60, 1, '2021-02-16 16:14:21', '2021-02-20 11:49:37');
INSERT INTO `auth_rule` VALUES (310, 309, '/wms/wup/purchase', '采购单', '', '', '', 1, 0, 1, '2021-02-16 16:15:01', '2021-02-16 16:15:01');
INSERT INTO `auth_rule` VALUES (312, 309, '/wms/wup/allot', '调拨单', '', '', '', 1, 0, 1, '2021-02-16 16:15:01', '2021-02-16 16:15:01');
INSERT INTO `auth_rule` VALUES (313, 309, '/wms/wup/order', '退货订单', '', '', '', 1, 0, 1, '2021-02-16 16:15:01', '2021-02-16 16:15:01');
INSERT INTO `auth_rule` VALUES (314, 104, '/wms/recv', '收货', 'fa-truck', '', '', 1, 70, 1, '2021-02-17 15:48:42', '2021-02-17 16:04:53');
INSERT INTO `auth_rule` VALUES (315, 314, '/wms/recv/allot', '调拨单', '', '', '', 1, 0, 1, '2021-01-19 16:59:29', '2021-02-17 16:04:51');
INSERT INTO `auth_rule` VALUES (316, 314, '/wms/recv/order', '退货订单', '', '', '', 1, 0, 1, '2021-01-19 16:59:29', '2021-02-17 16:04:51');
INSERT INTO `auth_rule` VALUES (317, 132, '/wms/wallot/index', '库存调拨', '', '', '', 1, 30, 1, '2021-02-17 16:20:00', '2021-02-18 19:29:51');
INSERT INTO `auth_rule` VALUES (318, 317, '/wms/wallot/info', '调拨单详情', '', '', '', 0, 0, 1, '2021-02-17 16:20:00', '2021-02-17 16:20:00');
INSERT INTO `auth_rule` VALUES (319, 317, '/wms/wallot/add', '添加调拨单', '', '', '', 0, 0, 1, '2021-02-17 16:20:00', '2021-02-17 16:20:00');
INSERT INTO `auth_rule` VALUES (320, 317, '/wms/wallot/save', '更新调拨单', '', '', '', 0, 0, 1, '2021-02-17 16:20:00', '2021-02-17 16:20:00');
INSERT INTO `auth_rule` VALUES (321, 317, '/wms/wallot/check', '审核调拨单', '', '', '', 0, 0, 1, '2021-02-17 16:20:00', '2021-02-17 16:20:00');
INSERT INTO `auth_rule` VALUES (322, 132, '/wms/warea/index', '仓库区域', '', '', '', 1, 100, 1, '2021-01-11 10:16:01', '2021-02-18 19:29:27');
INSERT INTO `auth_rule` VALUES (323, 322, '/wms/warea/save', '保存区域', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (324, 322, '/wms/warea/add', '添加区域', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (325, 322, '/wms/warea/delete', '删除区域', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (326, 132, '/wms/wborrow/index', '商品借用', '', '', '', 1, 20, 1, '2021-01-11 10:16:01', '2021-02-18 19:29:58');
INSERT INTO `auth_rule` VALUES (327, 326, '/wms/wborrow/save', '保存借用单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (328, 326, '/wms/wborrow/add', '添加借用单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (329, 326, '/wms/wborrow/check', '审核借用单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (330, 326, '/wms/wborrow/info', '借用单详情', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (331, 132, '/wms/wlocation/index', '库位管理', '', '', '', 1, 80, 1, '2021-01-11 10:16:01', '2021-02-18 19:30:21');
INSERT INTO `auth_rule` VALUES (332, 331, '/wms/wlocation/save', '保存库位', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (333, 331, '/wms/wlocation/add', '添加库位', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (334, 132, '/wms/wshelf/index', '货架管理', '', '', '', 1, 90, 1, '2021-01-11 10:16:01', '2021-02-18 19:30:13');
INSERT INTO `auth_rule` VALUES (335, 334, '/wms/wshelf/save', '保存货架', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (336, 334, '/wms/wshelf/add', '添加货架', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (337, 309, '/wms/wup/borrow', '借用商品', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (338, 314, '/wms/recv/borrow', '借用商品', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (339, 104, '/wms/wscan', '扫描出库', 'fa-outdent', '', '', 1, 40, 1, '2021-02-20 11:34:34', '2021-04-01 13:37:11');
INSERT INTO `auth_rule` VALUES (340, 339, '/wms/wscan/order', '订单出库', '', '', '', 1, 100, 1, '2021-01-11 10:16:01', '2021-02-22 23:03:57');
INSERT INTO `auth_rule` VALUES (341, 339, '/wms/wscan/allot', '调拨出库', '', '', '', 1, 80, 1, '2021-01-11 10:16:01', '2021-02-22 23:04:00');
INSERT INTO `auth_rule` VALUES (342, 339, '/wms/wscan/borrow', '借用出库', '', '', '', 1, 70, 1, '2021-01-11 10:16:01', '2021-02-22 23:04:04');
INSERT INTO `auth_rule` VALUES (343, 339, '/wms/wscan/damage', '报损出库', '', '', '', 1, 60, 1, '2021-01-11 10:16:01', '2021-02-22 23:04:07');
INSERT INTO `auth_rule` VALUES (344, 339, '/wms/wscan/weight', '扫描称重', '', '', '', 1, 90, 1, '2021-01-11 10:16:01', '2021-02-22 23:04:10');
INSERT INTO `auth_rule` VALUES (345, 315, '/wms/recv/allot_recv', '调拨收货', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-02-24 20:43:09');
INSERT INTO `auth_rule` VALUES (346, 316, '/wms/recv/order_recv', '订单退货收货', '', '', '', 0, 0, 1, '2021-03-01 11:38:41', '2021-03-01 11:38:41');
INSERT INTO `auth_rule` VALUES (347, 338, '/wms/recv/borrow_recv', '借用收货', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-03-01 14:14:39');
INSERT INTO `auth_rule` VALUES (348, 132, '/wms/wfind/index', '商品查询', '', '', '', 1, 105, 1, '2021-01-11 10:16:01', '2021-03-01 14:17:10');
INSERT INTO `auth_rule` VALUES (349, 98, '/cha/express/index', '国内快递', 'fa-truck', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (350, 349, '/cha/express/add', '添加快递', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (351, 349, '/cha/express/delete', '删除快递', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (352, 349, '/cha/express/save', '更新快递', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (353, 354, '/order/manager/order_return', '订单退货', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (354, 92, '/order/manager/returns', '退货订单', '', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-04-05 12:12:07');
INSERT INTO `auth_rule` VALUES (355, 354, '/order/manager/return_track_info', '退货物流信息', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (356, 103, '/order/manager/declare', '手动申报订单', '', '', '', 0, 0, 1, '2021-03-10 18:22:47', '2021-03-10 18:22:47');
INSERT INTO `auth_rule` VALUES (357, 113, '/pur/purchase/print', '打印采购单', '', '', '', 0, 0, 1, '2021-03-12 19:30:42', '2021-03-12 19:30:42');
INSERT INTO `auth_rule` VALUES (358, 270, '/pur/track/track', '查看物流详情', '', '', '', 0, 0, 1, '2021-03-15 20:26:35', '2021-03-15 20:26:35');
INSERT INTO `auth_rule` VALUES (359, 317, '/wms/wallot/tinfo', '调拨物流详情', '', '', '', 0, 0, 1, '2021-03-18 16:40:35', '2021-03-18 16:40:35');
INSERT INTO `auth_rule` VALUES (360, 270, '/pur/track/add', '添加采购追踪号', '', '', '', 0, 0, 1, '2021-03-18 20:51:42', '2021-03-18 20:51:42');
INSERT INTO `auth_rule` VALUES (361, 270, '/pur/track/save', '保存采购追踪号', '', '', '', 0, 0, 1, '2021-03-18 20:55:11', '2021-03-18 20:55:11');
INSERT INTO `auth_rule` VALUES (362, 339, '/wms/wscan/purchase_ren', '采购退货', '', '', '', 1, 0, 1, '2021-03-23 16:46:00', '2021-03-23 16:46:00');
INSERT INTO `auth_rule` VALUES (363, 339, '/wms/wscan/purchase_ex', '采购换货', '', '', '', 1, 0, 1, '2021-03-23 16:47:20', '2021-03-23 16:47:38');
INSERT INTO `auth_rule` VALUES (365, 104, '/wms/wprint/index', '打印条码', 'fa-barcode', '', '', 1, 30, 1, '2021-04-01 13:36:46', '2021-04-01 13:37:16');
INSERT INTO `auth_rule` VALUES (366, 115, '/report/index/order', '订单', '', '', '', 1, 0, 1, '2021-04-01 14:12:38', '2021-04-01 14:12:38');
INSERT INTO `auth_rule` VALUES (367, 111, '/report/data/index', '数据看板', 'fa-table', '', '', 1, 80, 1, '2021-04-01 14:15:33', '2021-04-01 14:15:47');
INSERT INTO `auth_rule` VALUES (368, 367, '/report/data/order', '订单销量', '', '', '', 1, 0, 1, '2021-04-01 14:16:18', '2021-06-11 16:02:28');
INSERT INTO `auth_rule` VALUES (369, 2, '/system/jobf/index', '审批管理', 'fa-shield', '', '', 1, 50, 1, '2021-01-11 10:16:01', '2021-04-02 15:54:13');
INSERT INTO `auth_rule` VALUES (370, 373, '/system/jobf/add', '添加模块', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (371, 373, '/system/jobf/delete', '删除模块', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (372, 373, '/system/jobf/save', '更新模块', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (373, 369, '/system/jobf/index', '模块列表', '', '', '', 1, 50, 1, '2021-01-11 10:16:01', '2021-04-23 17:39:46');
INSERT INTO `auth_rule` VALUES (374, 369, '/system/jobs/index', '审批流列表', '', '', '', 1, 50, 1, '2021-01-11 10:16:01', '2021-04-23 17:39:38');
INSERT INTO `auth_rule` VALUES (375, 374, '/system/jobs/save', '更新审批流', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (376, 374, '/system/jobs/add', '添加审批流', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (377, 373, '/system/jobf/info', '模块详情', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (378, 92, '/order/manager/lock', '占用库存', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (379, 92, '/order/manager/unlock', '释放库存', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (380, 113, '/pur/purchase/verification', '核销采购单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (381, 365, '/wms/pmabox/index', '亚马逊箱唛', '', '', '', 1, 10, 1, '2021-04-19 14:09:06', '2021-04-19 14:11:23');
INSERT INTO `auth_rule` VALUES (382, 365, '/wms/wprint/index', '商品条码', '', '', '', 1, 20, 1, '2021-04-19 14:10:56', '2021-04-19 14:11:24');
INSERT INTO `auth_rule` VALUES (383, 381, '/wms/pmabox/print', '打印箱唛', '', '', '', 0, 0, 1, '2021-04-19 14:13:06', '2021-04-19 14:13:06');
INSERT INTO `auth_rule` VALUES (384, 381, '/wms/pmabox/save', '更新箱唛', '', '', '', 0, 0, 1, '2021-04-19 14:13:49', '2021-04-19 14:13:49');
INSERT INTO `auth_rule` VALUES (385, 381, '/wms/pmabox/add', '添加箱唛', '', '', '', 0, 0, 1, '2021-04-19 14:14:30', '2021-04-19 14:14:30');
INSERT INTO `auth_rule` VALUES (386, 113, '/pur/purchase/producer_sn', '更新供应商单号', '', '', '', 0, 0, 1, '2021-04-22 10:35:26', '2021-04-22 10:35:26');
INSERT INTO `auth_rule` VALUES (387, 367, '/report/month/order', '按月统计', '', '', '', 1, 0, 1, '2021-06-11 16:04:29', '2021-06-11 16:04:29');
INSERT INTO `auth_rule` VALUES (388, 103, '/order/manager/purchase', '生成采购单', '', '', '', 0, 0, 1, '2021-03-10 18:22:47', '2021-03-10 18:22:47');
INSERT INTO `auth_rule` VALUES (389, 296, '/wms/wcheck/log', '盘点日志', '', '', '', 1, 0, 1, '2021-06-18 16:47:08', '2021-06-18 16:47:08');
INSERT INTO `auth_rule` VALUES (390, 103, '/order/manager/repair', '修复订单', '', '', '', 0, 0, 1, '2021-03-10 18:22:47', '2021-03-10 18:22:47');
INSERT INTO `auth_rule` VALUES (391, 91, '/order/pick/index', '批量拣货', 'fa-shopping-cart', '', '', 1, 0, 1, '2021-01-11 10:16:01', '2021-07-17 11:46:25');
INSERT INTO `auth_rule` VALUES (392, 391, '/order/pick/info', '拣货详情', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-07-17 11:42:44');
INSERT INTO `auth_rule` VALUES (393, 391, '/order/pick/order', '匹配拣货单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-07-17 11:42:59');
INSERT INTO `auth_rule` VALUES (394, 391, '/order/pick/look', '查看拣货单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-07-17 11:42:44');
INSERT INTO `auth_rule` VALUES (395, 391, '/order/pick/print_pick', '打印拣货单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-07-17 11:42:44');
INSERT INTO `auth_rule` VALUES (396, 391, '/order/pick/generate', '生成拣货单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-07-17 11:42:44');
INSERT INTO `auth_rule` VALUES (397, 391, '/order/pick/print_label', '点击打印面单', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-07-17 11:42:44');
INSERT INTO `auth_rule` VALUES (398, 104, '/wms/keyword', '关键词库', 'fa-file-text-o', '', '', 1, 88, 1, '2021-01-11 10:16:01', '2021-07-20 16:08:11');
INSERT INTO `auth_rule` VALUES (399, 402, '/wms/kcate/save', '更新分类', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (400, 402, '/wms/kcate/delete', '删除分类', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (401, 402, '/wms/kcate/add', '添加分类', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (402, 398, '/wms/kcate/index', '关键词分类', '', '', '', 1, 80, 1, '2021-01-11 10:16:01', '2021-07-21 10:27:24');
INSERT INTO `auth_rule` VALUES (403, 398, '/wms/keyword/index', '关键词', '', '', '', 1, 90, 1, '2021-01-11 10:16:01', '2021-02-17 16:07:18');
INSERT INTO `auth_rule` VALUES (404, 403, '/wms/keyword/save', '更新关键词', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (405, 403, '/wms/keyword/delete', '删除关键词', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (406, 403, '/wms/keyword/add', '添加关键词', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (407, 403, '/wms/keyword/import', '导入关键词', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-01-11 10:16:01');
INSERT INTO `auth_rule` VALUES (408, 391, '/order/pick/reset', '重围打印状态', '', '', '', 0, 0, 1, '2021-01-11 10:16:01', '2021-07-17 11:42:44');
COMMIT;

-- ----------------------------
-- Table structure for channel
-- ----------------------------
DROP TABLE IF EXISTS `channel`;
CREATE TABLE `channel` (
  `channel_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `carrier_id` int(11) unsigned NOT NULL COMMENT '承运商id',
  `channel_code` varchar(128) NOT NULL COMMENT '渠道代码',
  `track_code` varchar(128) NOT NULL DEFAULT '' COMMENT '对接物流信息渠道代码',
  `channel_name` varchar(255) NOT NULL COMMENT '渠道名称',
  `channel_type` tinyint(3) NOT NULL COMMENT '渠道类型，10邮政，20专线，30快递，40其它',
  `is_track` tinyint(1) NOT NULL COMMENT '是否可追踪，1可追踪，0不可追踪',
  `default_weight` smallint(5) NOT NULL DEFAULT '1000' COMMENT '默认起重，单位g',
  `default_discount` smallint(3) NOT NULL DEFAULT '100' COMMENT '默认折扣',
  `default_bill_tpl` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '默认计费模板',
  `return_address` varchar(255) NOT NULL DEFAULT '' COMMENT '回邮地址',
  `day_max_shipping` mediumint(8) DEFAULT '0' COMMENT '单日最大发货量',
  `special_code` varchar(255) NOT NULL DEFAULT '' COMMENT '特许码',
  `part_code` varchar(255) NOT NULL DEFAULT '' COMMENT '分练码',
  `bar_code` varchar(255) NOT NULL DEFAULT '' COMMENT '条码',
  `track_type` tinyint(1) DEFAULT NULL COMMENT '追踪号获取方式，1预备追踪号，2API获取',
  `label_type` tinyint(1) DEFAULT NULL COMMENT '面单制作方式，1自制，2API下载',
  `label_width` smallint(3) NOT NULL DEFAULT '100' COMMENT '面单宽，黑夜100mm',
  `label_height` smallint(3) NOT NULL DEFAULT '100' COMMENT '面单高，默认100mm',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '开启状态，1开启，0关闭，2测试',
  `sort` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `ext_json` json DEFAULT NULL COMMENT '扩展字段',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`channel_id`) USING BTREE,
  KEY `channel_aid_idx` (`carrier_id`) USING BTREE,
  KEY `channel_code` (`channel_code`) USING BTREE,
  CONSTRAINT `channel_aid` FOREIGN KEY (`carrier_id`) REFERENCES `channel_carrier` (`carrier_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='渠道列表';

-- ----------------------------
-- Records of channel
-- ----------------------------
BEGIN;
INSERT INTO `channel` VALUES (9, 5, 'YOGB', 'yodel', '英国Yodel专线', 30, 1, 1000, 0, 0, '', 1000, '', '', '', 2, 2, 100, 150, 1, 0, '', NULL, '2020-11-24 11:06:13', '2021-01-27 21:45:37', 2, 1);
INSERT INTO `channel` VALUES (11, 5, 'NLR', 'postnl-parcels', '欧电宝OPG', 30, 1, 1000, 0, 0, '', 1000, '', '', '', 2, 2, 100, 100, 1, 0, '', NULL, '2020-11-26 21:40:42', '2021-01-27 21:44:55', 1, 1);
INSERT INTO `channel` VALUES (15, 6, 'A008', '', '多渠道发货', 40, 1, 0, 0, 0, '', 0, '', '', '', 1, 1, 100, 100, 1, 0, '', NULL, '2020-12-06 13:17:28', '2020-12-06 13:17:28', 1, 1);
INSERT INTO `channel` VALUES (16, 7, 'BKZXR', 'yunexpress', '云途全球专线挂号（标快）', 20, 1, 0, 0, 0, '', 0, '', '', '', 2, 2, 100, 100, 1, 0, '', NULL, '2021-02-23 21:28:23', '2021-02-23 21:31:53', 1, 1);
INSERT INTO `channel` VALUES (17, 7, 'THZXR', 'yunexpress', '云途全球专线挂号（特惠带电）', 20, 1, 0, 0, 0, '', 0, '', '', '', 2, 2, 100, 100, 1, 0, '', NULL, '2021-02-23 21:29:19', '2021-02-23 21:31:06', 1, 1);
INSERT INTO `channel` VALUES (18, 5, 'USZM', 'usps-international', '中美海运挂号专线', 20, 1, 1000, 100, 0, '', 0, '', '', '', 2, 2, 100, 150, 1, 0, '', NULL, '2021-06-25 11:20:08', '2021-06-26 09:51:42', 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for channel_carrier
-- ----------------------------
DROP TABLE IF EXISTS `channel_carrier`;
CREATE TABLE `channel_carrier` (
  `carrier_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `carrier_num` varchar(128) NOT NULL DEFAULT '' COMMENT '承运商编号',
  `carrier_name` varchar(255) NOT NULL COMMENT '承运商名称',
  `pay_type` tinyint(2) NOT NULL DEFAULT '40' COMMENT '付款方式',
  `take_time` varchar(128) NOT NULL DEFAULT '' COMMENT '提货时间',
  `out_time` varchar(128) NOT NULL DEFAULT '' COMMENT '出库时间',
  `contacts` varchar(128) NOT NULL DEFAULT '' COMMENT '联系人',
  `phone` varchar(32) NOT NULL DEFAULT '' COMMENT '联系电话',
  `address` varchar(1024) NOT NULL DEFAULT '' COMMENT '承运商地址',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '开启状态，1开启，0关闭',
  `site` varchar(255) NOT NULL DEFAULT '' COMMENT '系统网址',
  `username` varchar(128) NOT NULL DEFAULT '' COMMENT '登录账号',
  `password` varchar(128) NOT NULL DEFAULT '' COMMENT '登录密码',
  `sort` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `document_path` varchar(1024) NOT NULL DEFAULT '' COMMENT '对接文档保存路径',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `classes` varchar(255) NOT NULL DEFAULT '' COMMENT '对接类',
  `api_base_url` varchar(1024) NOT NULL DEFAULT '' COMMENT 'api请求基础路径',
  `token` json DEFAULT NULL COMMENT '秘钥配置信息',
  `ext_json` json DEFAULT NULL COMMENT '扩展字段，保存json格式',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`carrier_id`) USING BTREE,
  UNIQUE KEY `channel_carrier_name` (`carrier_name`(128)) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='承运商列表';

-- ----------------------------
-- Records of channel_carrier
-- ----------------------------
BEGIN;
INSERT INTO `channel_carrier` VALUES (3, 'A003', '华翰物流', 40, '', '', '', '', '', 1, 'http://www.hhddb.com', '', '', 0, 'http://new.hh-exp.com:8181/docs/mindoc/v1', '', 'HuaHan', 'http://api.hh-exp.com/default/svc/wsdl', NULL, NULL, '2020-09-04 20:03:26', '2020-11-26 21:34:30', 0, 1);
INSERT INTO `channel_carrier` VALUES (5, 'A007', '易通关', 40, '下午5点', '', '', '', '', 1, 'http://sys.etg56.com/client/login', '', '', 0, '/attachment/document/yitongguan.pdf', '', 'YiTongGuan', 'http://sys.etg56.com:8880/wb_lc/cxf/ParcelOprWebService?wsdl', '{}', NULL, '2020-11-24 11:03:09', '2020-11-26 21:36:13', 2, 1);
INSERT INTO `channel_carrier` VALUES (6, 'A008', '亚马逊', 40, '', '', '', '', '', 1, '', '', '', 0, '', '', '', '', NULL, NULL, '2020-12-06 13:16:39', '2020-12-06 13:16:39', 1, 1);
INSERT INTO `channel_carrier` VALUES (7, 'A005', '云途', 40, '', '', '', '', '', 1, 'https://passport.yunexpress.com/login', '', '', 0, '/attachment/document/yuntu.pdf', '', 'YunTu', 'http://oms.api.yunexpress.com', '{}', NULL, '2021-02-23 18:25:13', '2021-02-23 18:37:29', 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for channel_express
-- ----------------------------
DROP TABLE IF EXISTS `channel_express`;
CREATE TABLE `channel_express` (
  `express_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `logistics_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '快递名称',
  `track_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '快递编码，获取追踪信息用',
  `site` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '官网地址',
  `contacts` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '联系人',
  `phone` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '联系电话',
  `address` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '网点地址',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `sort` smallint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `take_time` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '提货时间',
  `remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`express_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='国内快递表';

-- ----------------------------
-- Records of channel_express
-- ----------------------------
BEGIN;
INSERT INTO `channel_express` VALUES (1, '圆通快递', 'yuantong', '', '', '', '', 1, 190, '', '', '2021-03-25 10:05:52', '2021-03-25 10:05:52', 1, 1);
INSERT INTO `channel_express` VALUES (2, '韵达快递', 'yunda', '', '', '', '', 1, 160, '', '', '2021-03-25 10:06:20', '2021-03-25 10:06:20', 1, 1);
INSERT INTO `channel_express` VALUES (3, '中通快递', 'zhongtong', '', '', '', '', 1, 180, '', '', '2021-03-25 10:06:35', '2021-03-25 10:06:35', 1, 1);
INSERT INTO `channel_express` VALUES (4, '顺丰速运', 'shunfeng', '', '', '', '', 1, 200, '', '', '2021-03-25 10:06:49', '2021-03-25 10:06:49', 1, 1);
INSERT INTO `channel_express` VALUES (5, '申通快递', 'shentong', '', '', '', '', 1, 170, '', '', '2021-03-25 10:07:03', '2021-03-25 10:07:03', 1, 1);
INSERT INTO `channel_express` VALUES (6, '百世快递', 'huitongkuaidi', '', '', '', '', 1, 0, '', '', '2021-03-25 10:07:29', '2021-03-25 10:07:29', 1, 1);
INSERT INTO `channel_express` VALUES (7, '京东物流', 'jd', '', '', '', '', 1, 0, '', '', '2021-03-25 10:07:47', '2021-03-25 10:07:47', 1, 1);
INSERT INTO `channel_express` VALUES (8, 'EMS', 'ems', '', '', '', '', 1, 0, '', '', '2021-03-25 10:08:01', '2021-03-25 10:08:01', 1, 1);
INSERT INTO `channel_express` VALUES (9, '德邦物流', 'debangwuliu', '', '', '', '', 1, 0, '', '', '2021-03-25 10:08:28', '2021-03-25 10:08:28', 1, 1);
INSERT INTO `channel_express` VALUES (10, '德邦快递', 'debangkuaidi', '', '', '', '', 1, 0, '', '', '2021-03-25 10:09:34', '2021-03-25 10:09:34', 1, 1);
INSERT INTO `channel_express` VALUES (11, '宅急送', 'zhaijisong', '', '', '', '', 1, 0, '', '', '2021-03-25 10:09:54', '2021-03-25 10:09:54', 1, 1);
INSERT INTO `channel_express` VALUES (12, '优速快递', 'youshuwuliu', '', '', '', '', 1, 0, '', '', '2021-03-25 10:11:32', '2021-03-25 10:11:32', 1, 1);
INSERT INTO `channel_express` VALUES (13, '天天快递', 'tiantian', '', '', '', '', 1, 0, '', '', '2021-03-25 10:12:18', '2021-03-25 10:12:18', 1, 1);
INSERT INTO `channel_express` VALUES (14, '同城快寄', 'shpost', '', '', '', '', 1, 0, '', '', '2021-03-25 10:12:43', '2021-03-25 10:12:43', 1, 1);
INSERT INTO `channel_express` VALUES (15, '国通快递', 'guotongkuaidi', '', '', '', '', 1, 0, '', '', '2021-03-25 10:15:20', '2021-03-25 10:15:20', 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for channel_orders
-- ----------------------------
DROP TABLE IF EXISTS `channel_orders`;
CREATE TABLE `channel_orders` (
  `ch_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `order_id` int(11) unsigned NOT NULL COMMENT '订单id',
  `channel_id` int(11) unsigned NOT NULL COMMENT '渠道id',
  `country_code` varchar(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '国家编码',
  `logistics_sn` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '物流商订单编号',
  `track_num` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '追踪号',
  `label_url` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '面单地址',
  `weight` int(11) NOT NULL DEFAULT '0' COMMENT '重量(g)',
  `logistics_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '运费',
  `track_status` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '物流状态: 0待揽收，10已揽收，20没有物流信息，30运输中，40派送中，50已签收，60运输超时，70派送失败，80物流异常，200无状态',
  `is_cancel` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否取消，1取消，0正常',
  `track_info` text CHARACTER SET utf8 COLLATE utf8_unicode_ci COMMENT '物流信息',
  `transfer_no_1` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '转单号1',
  `transfer_no_2` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '转单号2',
  `transfer_no_3` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '转单号3',
  `remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`ch_id`) USING BTREE,
  KEY `channel_order_track_num` (`track_num`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1480 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='渠道预报订单';

-- ----------------------------
-- Records of channel_orders
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for channel_sender
-- ----------------------------
DROP TABLE IF EXISTS `channel_sender`;
CREATE TABLE `channel_sender` (
  `sender_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `account_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '绑定销售账号，如果为0刚不绑定',
  `country_code` varchar(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'CN' COMMENT '国家代码默认中国',
  `province` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '所在省份',
  `city` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '所在城市',
  `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '地址',
  `post_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '邮编',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '发件人',
  `phone` varchar(65) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '电话',
  `mobile` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '手机',
  `email` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '邮箱',
  `fax` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '传真',
  `company` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '公司',
  `is_default` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否为默认配置，1是，0不是',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否可用，1可用，0禁用',
  `remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`sender_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='寄件人表';

-- ----------------------------
-- Records of channel_sender
-- ----------------------------
BEGIN;
INSERT INTO `channel_sender` VALUES (1, 15, 'CN', '广东省', '深圳', '宝安区宝安大道105号', '518000', '李先生', '0755-76789978', '18955871298', '', '', '', 1, 1, '', '2020-09-05 09:52:07', '2020-12-13 14:08:48', 0, 2);
INSERT INTO `channel_sender` VALUES (3, 0, 'CN', 'fd', 'fds', 'fsd', 'fsd', 'aa', 'dd', 'dd', 'dd', '', '', 0, 0, 'fsfd', '2020-09-18 20:50:19', '2020-12-13 13:06:13', 2, 2);
INSERT INTO `channel_sender` VALUES (4, 2, 'CN', 'fsd', 'fsd', 'fsd', 'fsd', 'fds', 'fsd', 'fsd', 'fds', '', '', 0, 0, 'fsd', '2020-09-18 20:53:44', '2020-12-13 14:08:49', 2, 2);
COMMIT;

-- ----------------------------
-- Table structure for cs_blacklist
-- ----------------------------
DROP TABLE IF EXISTS `cs_blacklist`;
CREATE TABLE `cs_blacklist` (
  `black_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `consignee` varchar(255) NOT NULL DEFAULT '' COMMENT '收件人',
  `platform_name` varchar(128) DEFAULT '' COMMENT '平台名称',
  `buyer_first_name` varchar(128) DEFAULT '' COMMENT '买家first name',
  `buyer_last_name` varchar(128) DEFAULT '' COMMENT '买家last name',
  `buyer_post_code` varchar(32) NOT NULL DEFAULT '' COMMENT '邮编',
  `buyer_phone` varchar(128) NOT NULL DEFAULT '' COMMENT '买家电话',
  `buyer_mobile` varchar(128) NOT NULL DEFAULT '' COMMENT '买家手机',
  `buyer_account` varchar(128) NOT NULL DEFAULT '' COMMENT '买家账号',
  `buyer_email` varchar(128) NOT NULL DEFAULT '' COMMENT '买家邮箱',
  `buyer_country_code` char(2) NOT NULL DEFAULT '' COMMENT '国家二字码',
  `buyer_province` varchar(128) NOT NULL DEFAULT '' COMMENT '省/洲',
  `buyer_city` varchar(128) NOT NULL DEFAULT '' COMMENT '城市',
  `buyer_address_1` varchar(255) NOT NULL DEFAULT '' COMMENT '地址',
  `risk_num` smallint(2) unsigned NOT NULL DEFAULT '3' COMMENT '风险等级',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否可用，1是，0否',
  `order_no` varchar(1024) NOT NULL DEFAULT '' COMMENT '购买过的订单号，多个使用英文逗号分开',
  `reason` varchar(1024) NOT NULL DEFAULT '' COMMENT '进入黑名单原因',
  `black_date` date NOT NULL COMMENT '进入黑名单日期',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  PRIMARY KEY (`black_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='客户黑名单';

-- ----------------------------
-- Records of cs_blacklist
-- ----------------------------
BEGIN;
INSERT INTO `cs_blacklist` VALUES (1, 'abc', 'Amazon', 'abc', 'abc', 'abc', '123456', '456779', 'amazon', '123456@qq.com', 'DE', '', '', '', 3, 1, '', '', '2020-12-10', '', '2020-12-10 21:10:22', 2);
INSERT INTO `cs_blacklist` VALUES (2, 'a', 'Amazon', 'd', '', 'b', '', '', '', '', 'CF', '', '', '', 10, 1, '', '', '2021-02-16', '', '2021-02-16 20:59:47', 2);
COMMIT;

-- ----------------------------
-- Table structure for cs_email_category
-- ----------------------------
DROP TABLE IF EXISTS `cs_email_category`;
CREATE TABLE `cs_email_category` (
  `cate_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父分类',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '分类名称',
  `keyword` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '针对问题关键词，多个使用英文逗号隔开',
  `sort` smallint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否可用，1是，0否',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`cate_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='邮件分类表';

-- ----------------------------
-- Records of cs_email_category
-- ----------------------------
BEGIN;
INSERT INTO `cs_email_category` VALUES (1, 0, '物流问题', '物流到哪里了,哪个物流商', 0, 1, '2020-12-10 20:54:47', '2020-12-10 21:05:06', 2, 2);
INSERT INTO `cs_email_category` VALUES (2, 1, '追踪号问题', '', 0, 1, '2020-12-10 21:04:16', '2020-12-10 21:04:16', 2, 2);
INSERT INTO `cs_email_category` VALUES (3, 0, '订单问题', '', 0, 1, '2020-12-10 21:04:41', '2020-12-10 21:04:41', 2, 2);
COMMIT;

-- ----------------------------
-- Table structure for cs_email_template
-- ----------------------------
DROP TABLE IF EXISTS `cs_email_template`;
CREATE TABLE `cs_email_template` (
  `temp_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `cate_id` int(11) unsigned NOT NULL COMMENT '分类id',
  `lang` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'en' COMMENT '邮件语言，国家二字码，默认en',
  `subject` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '主题',
  `subject_ch` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '主题翻译中文',
  `content` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '邮件内容',
  `content_ch` text CHARACTER SET utf8 COLLATE utf8_unicode_ci COMMENT '邮件翻译中文内容',
  `variable` json DEFAULT NULL COMMENT '邮件模板变量',
  `keyword` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '针对问题关键词，多个使用英文逗号隔开',
  `is_html` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为HTML，1是，0否',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否可用，1是，0否',
  `remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `sort` smallint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`temp_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='邮件模板表';

-- ----------------------------
-- Records of cs_email_template
-- ----------------------------
BEGIN;
INSERT INTO `cs_email_template` VALUES (1, 1, 'GB', '', '', '客户：\r\n你的订单是：${order_no}\r\n追踪号是：${shipping_code}\r\n国家：${buyer_country_code}\r\n电话：${buyer_phone}\r\n物流公司电话是：${wuliu_dianhua}', '', '{\"wuliu_dianhua\": \"18999887766\"}', '物流问题,运输问题', 0, 1, '', 0, '2020-12-10 21:01:02', '2020-12-10 21:19:43', 2, 2);
COMMIT;

-- ----------------------------
-- Table structure for finance_bank
-- ----------------------------
DROP TABLE IF EXISTS `finance_bank`;
CREATE TABLE `finance_bank` (
  `bank_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `name` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '银行名称',
  `user` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '开户名',
  `mobile` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '绑定手机',
  `account` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '银行账号',
  `address` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '开户行地址',
  `address_en` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '银行英文地址',
  `code` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '银行代码',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用，1可用，0不可用',
  `is_default` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否默认',
  `sort` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  PRIMARY KEY (`bank_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='银行账号管理';

-- ----------------------------
-- Records of finance_bank
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for finance_cash
-- ----------------------------
DROP TABLE IF EXISTS `finance_cash`;
CREATE TABLE `finance_cash` (
  `cash_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `account` varchar(63) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '收款账号',
  `cash_user_id` int(11) DEFAULT NULL COMMENT '收款确认人',
  `cash_type` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '收款类型，1.银行转账，2.支付宝，3.现金',
  `cash_status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '收款状态，0待收款，10部分收款，20全部收款，30对方拒付，40部分退款，50全部退款，60取消',
  `pay_user` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '付款人',
  `pay_company` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '付款单位',
  `pay_account` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '付款账号',
  `currency` char(3) NOT NULL DEFAULT 'CNY' COMMENT '支付币种，默认人民币',
  `cash_money` decimal(15,4) unsigned NOT NULL COMMENT '应收金额',
  `service_charge` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '应付手续费',
  `real_money` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '实收金额',
  `biz_date` date NOT NULL COMMENT '应收款时间',
  `real_date` datetime DEFAULT NULL COMMENT '实际收款时间',
  `check_status` tinyint(2) unsigned NOT NULL DEFAULT '30' COMMENT '审核状态',
  `ref_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '业务类型',
  `ref_id_type` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '业务主表',
  `ref_sn` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '业务单号',
  `is_invoice` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否提供发票',
  `invoice_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发票id',
  `invoice_money` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '发票金额',
  `tax` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '税',
  `cost_desc` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '费用说明',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`cash_id`) USING BTREE,
  KEY `finance_cash_ref_sn` (`ref_sn`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='收款单记录表';

-- ----------------------------
-- Records of finance_cash
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for finance_invoice_setting
-- ----------------------------
DROP TABLE IF EXISTS `finance_invoice_setting`;
CREATE TABLE `finance_invoice_setting` (
  `invoice_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '发票类型，0增值税，10普通发票',
  `title` varchar(255) NOT NULL COMMENT '发票抬头',
  `tax_code` varchar(64) NOT NULL COMMENT '纳税人识别号',
  `address` varchar(255) NOT NULL DEFAULT '' COMMENT '企业地址',
  `phone` varchar(32) NOT NULL DEFAULT '' COMMENT '企业电话',
  `bank_address` varchar(255) NOT NULL DEFAULT '' COMMENT '开户行地址',
  `bank_account` varchar(32) NOT NULL DEFAULT '' COMMENT '银行账号',
  `email` varchar(32) NOT NULL DEFAULT '' COMMENT '邮箱',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否可用',
  `is_default` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否默认',
  `sort` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  PRIMARY KEY (`invoice_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='发票管理';

-- ----------------------------
-- Records of finance_invoice_setting
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for finance_log
-- ----------------------------
DROP TABLE IF EXISTS `finance_log`;
CREATE TABLE `finance_log` (
  `log_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `id_type` varchar(63) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '业务主表',
  `ref_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '业务id',
  `type` tinyint(1) unsigned NOT NULL COMMENT '1收款，-1付款',
  `money` decimal(15,4) NOT NULL COMMENT '操作金额',
  `before_data` text COMMENT '操作前数据',
  `after_data` text COMMENT '操作后数据',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
  `create_by` int(11) unsigned NOT NULL COMMENT '操作人',
  PRIMARY KEY (`log_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='财务操作日志';

-- ----------------------------
-- Records of finance_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for finance_payment
-- ----------------------------
DROP TABLE IF EXISTS `finance_payment`;
CREATE TABLE `finance_payment` (
  `payment_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `biz_date` date NOT NULL COMMENT '应付款日期',
  `real_date` datetime DEFAULT NULL COMMENT '实际付款日期',
  `check_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '审核状态',
  `bank` varchar(255) NOT NULL DEFAULT '' COMMENT '银行',
  `bank_address` varchar(1024) NOT NULL DEFAULT '' COMMENT '银行地址',
  `bank_user` varchar(128) NOT NULL DEFAULT '' COMMENT '户名',
  `account` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '收款账号',
  `pay_type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '付款方式：10.银行转账，20.支付宝，30.现金，40.预付款，50.尾款，60.账期，70.款到发货，80.货到付款',
  `pay_status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '付款状态，0未付款，10申请付款，20部分付款，30全部付款，40拒付，50部分退款，60全部退款，70取消',
  `currency` char(3) NOT NULL DEFAULT 'CNY' COMMENT '支付币种，默认人民币',
  `act_account` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '付款账号',
  `act_money` decimal(15,4) unsigned NOT NULL COMMENT '应付金额',
  `service_charge` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '应付手续费',
  `real_money` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '实付金额',
  `pay_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '付款人',
  `ref_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '业务类型',
  `ref_id_type` varchar(63) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '业务主表',
  `ref_sn` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '业务单号',
  `is_invoice` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否提供发票',
  `invoice_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发票id',
  `invoice_money` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '发票金额',
  `tax` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '税',
  `cost_desc` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '费用说明',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`payment_id`) USING BTREE,
  KEY `finance_paymet_ref_index` (`ref_sn`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='付款记录表';

-- ----------------------------
-- Records of finance_payment
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for job_approve
-- ----------------------------
DROP TABLE IF EXISTS `job_approve`;
CREATE TABLE `job_approve` (
  `approve_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `flow_id` int(11) NOT NULL COMMENT '配置id',
  `ref_id` int(1) NOT NULL COMMENT '被审批id',
  `id_type` varchar(128) NOT NULL COMMENT '模块名称',
  `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0待审批，10通过，20驳回',
  `current_name` varchar(128) NOT NULL DEFAULT '' COMMENT '当前节点名称',
  `current_node` tinyint(3) NOT NULL COMMENT '当前审批节点',
  `next_name` varchar(128) NOT NULL DEFAULT '' COMMENT '下一节点名称',
  `next_node` tinyint(3) NOT NULL DEFAULT '0' COMMENT '下一审批节点',
  `is_end` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否结束，1是，0不是',
  `check_user_id` int(11) NOT NULL COMMENT '当前审批人',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  PRIMARY KEY (`approve_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=373 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='审批表';

-- ----------------------------
-- Records of job_approve
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for job_flow_module
-- ----------------------------
DROP TABLE IF EXISTS `job_flow_module`;
CREATE TABLE `job_flow_module` (
  `flow_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `module` varchar(128) NOT NULL DEFAULT '' COMMENT '模块',
  `name` varchar(128) NOT NULL COMMENT '审批流名称',
  `id_type` varchar(64) NOT NULL DEFAULT '' COMMENT '数据表名',
  `sort` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`flow_id`) USING BTREE,
  UNIQUE KEY `job_flow_module_name` (`module`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='审批配置表';

-- ----------------------------
-- Records of job_flow_module
-- ----------------------------
BEGIN;
INSERT INTO `job_flow_module` VALUES (1, 'purchase', '采购审批流', 'purchase', 0, '', '2020-12-01 21:30:29', '2020-12-01 21:30:29', 0, 0);
INSERT INTO `job_flow_module` VALUES (2, 'warehouse_allot', '仓库调拨出库', 'warehouse_allot', 0, '', '2020-12-01 21:48:27', '2020-12-01 21:48:27', 0, 0);
INSERT INTO `job_flow_module` VALUES (5, 'finance_payment', '财务付款单', 'finance_payment', 0, '', '2021-01-16 16:08:23', '2021-01-16 16:08:23', 0, 0);
INSERT INTO `job_flow_module` VALUES (6, 'purchase_exchange', '采购换货审批', 'purchase_exchange', 0, '', '2021-01-23 18:28:30', '2021-01-23 18:28:30', 0, 0);
INSERT INTO `job_flow_module` VALUES (7, 'purchase_return', '采购退货审批', 'purchase_return', 0, '', '2021-02-04 18:18:41', '2021-02-04 18:18:41', 0, 0);
INSERT INTO `job_flow_module` VALUES (8, 'finance_cash', '财务收款单', 'finance_cash', 0, '', '2021-02-05 17:31:42', '2021-02-05 17:31:42', 0, 0);
INSERT INTO `job_flow_module` VALUES (9, 'warehouse_check', '仓库盘点', 'warehouse_check', 0, '', '2021-02-10 11:22:28', '2021-02-10 11:22:28', 0, 0);
INSERT INTO `job_flow_module` VALUES (11, 'warehouse_borrow', '仓库借用审批', 'warehouse_borrow', 0, '', '2021-02-21 20:53:00', '2021-02-21 20:53:00', 0, 0);
COMMIT;

-- ----------------------------
-- Table structure for job_flow_settings
-- ----------------------------
DROP TABLE IF EXISTS `job_flow_settings`;
CREATE TABLE `job_flow_settings` (
  `settings_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `flow_id` int(10) unsigned NOT NULL COMMENT '配置id',
  `node` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '审批节点',
  `name` varchar(128) NOT NULL DEFAULT '' COMMENT '节点名称',
  `is_end` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否最后一个节点，1是，0不是',
  `user_id` varchar(255) NOT NULL COMMENT '审批人id,多个使用英文逗号分开',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`settings_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='审批人配置表';

-- ----------------------------
-- Records of job_flow_settings
-- ----------------------------
BEGIN;
INSERT INTO `job_flow_settings` VALUES (7, 5, 1, '财务经理审批', 0, '1,2', '', '2021-01-16 16:08:59', '2021-01-16 16:08:59', 0, 0);
INSERT INTO `job_flow_settings` VALUES (8, 5, 2, '总经理审批', 1, '1,2', '', '2021-01-16 16:09:22', '2021-01-16 16:09:22', 0, 0);
INSERT INTO `job_flow_settings` VALUES (9, 6, 1, '采购经理审批', 0, '1,2', '', '2021-01-23 18:29:19', '2021-01-23 18:29:19', 0, 0);
INSERT INTO `job_flow_settings` VALUES (10, 6, 2, '仓库经理审批', 1, '1,2', '', '2021-01-23 18:29:43', '2021-01-23 18:29:43', 0, 0);
INSERT INTO `job_flow_settings` VALUES (11, 7, 1, '采购主管审批', 0, '1,2', '', '2021-02-04 18:19:15', '2021-02-04 18:19:15', 0, 0);
INSERT INTO `job_flow_settings` VALUES (12, 7, 2, '仓库主管审批', 1, '1,2', '', '2021-02-04 18:19:32', '2021-02-04 18:19:32', 0, 0);
INSERT INTO `job_flow_settings` VALUES (13, 8, 1, '财务经理审批', 0, '1,2', '', '2021-02-05 17:33:22', '2021-02-05 17:33:22', 0, 0);
INSERT INTO `job_flow_settings` VALUES (14, 8, 2, '总经理审批', 1, '1,2', '', '2021-02-05 17:33:41', '2021-02-05 17:33:41', 0, 0);
INSERT INTO `job_flow_settings` VALUES (15, 9, 1, '仓库审批', 0, '1,2', '', '2021-02-10 11:22:54', '2021-02-10 11:22:54', 0, 0);
INSERT INTO `job_flow_settings` VALUES (16, 9, 2, '总经理审批', 1, '1,2', '', '2021-02-10 11:23:24', '2021-02-10 11:23:24', 0, 0);
INSERT INTO `job_flow_settings` VALUES (17, 2, 1, '主管审批', 0, '1,2', '', '2021-02-19 20:05:29', '2021-02-19 20:05:29', 0, 0);
INSERT INTO `job_flow_settings` VALUES (18, 2, 2, '仓库审批', 1, '1,2', '', '2021-02-19 20:05:47', '2021-02-19 20:05:47', 0, 0);
INSERT INTO `job_flow_settings` VALUES (32, 11, 1, '仓库审批', 0, '1,2', '', '2021-04-03 17:02:12', '2021-04-03 17:02:12', 2, 2);
INSERT INTO `job_flow_settings` VALUES (33, 11, 2, '仓库主管审批', 0, '1,2', '', '2021-04-03 17:02:12', '2021-04-03 17:02:12', 2, 2);
INSERT INTO `job_flow_settings` VALUES (34, 11, 3, 'brbrbr', 1, '1,2,4', '', '2021-04-03 17:02:12', '2021-04-03 17:02:12', 2, 2);
INSERT INTO `job_flow_settings` VALUES (35, 1, 1, '采购主管审批', 0, '1,2', '', '2021-04-03 18:12:24', '2021-04-03 18:12:24', 2, 2);
INSERT INTO `job_flow_settings` VALUES (36, 1, 2, '采购经理审批', 0, '1,2', '', '2021-04-03 18:12:24', '2021-04-03 18:12:24', 2, 2);
INSERT INTO `job_flow_settings` VALUES (37, 1, 3, '总经理审批', 0, '1,2', '', '2021-04-03 18:12:24', '2021-04-03 18:12:24', 2, 2);
INSERT INTO `job_flow_settings` VALUES (38, 1, 4, 'tete', 1, '4,2', '', '2021-04-03 18:12:24', '2021-04-03 18:12:24', 2, 2);
COMMIT;

-- ----------------------------
-- Table structure for orders
-- ----------------------------
DROP TABLE IF EXISTS `orders`;
CREATE TABLE `orders` (
  `order_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `order_sn` varchar(64) NOT NULL DEFAULT '' COMMENT '内部统一订单号',
  `order_no` varchar(288) NOT NULL DEFAULT '' COMMENT '平台订单号',
  `account_id` int(11) unsigned NOT NULL COMMENT '销售账号',
  `platform_name` varchar(128) NOT NULL COMMENT '平台名称',
  `order_status` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0:待处理;10:已分仓;20:占用库存;30:释放库存;40:申报中;50:申报成功;60:申报失败;70:获取面单失败;80:缺货;90:待采购;100:采购中;110:捡货中;120:待出货;130:已发货;140:全部退款;150:部分退款;160:已拒付;170:风险;180:刷单;190: 取消订单;200:异常;210:价格低;220:订单完成',
  `is_print` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否打印面单, 1是，0否',
  `latest_delivery_time` datetime DEFAULT NULL COMMENT '最迟发货时间',
  `profit` decimal(15,4) NOT NULL DEFAULT '0.0000' COMMENT '利润人民币',
  `weight` int(11) NOT NULL DEFAULT '0' COMMENT '重量(g)',
  `prime_cost` decimal(15,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单成本',
  `refund` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '退款金额(人民币)',
  `target_refund` decimal(15,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '退款目标金额',
  `send_status` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0:未发货;10:更换渠道;20:部分发货;30:已发货;40:超时未发货;50:退货中;60:全部退货;70:部分退货;80:无需发货,90:运输超时,100:派送中,110:派送失败,120:物流异常,130已签收',
  `order_platform_status` varchar(255) NOT NULL DEFAULT '' COMMENT '订单在平台状态',
  `payment_method` varchar(255) NOT NULL DEFAULT '' COMMENT '支付方式',
  `customs_code` varchar(255) NOT NULL DEFAULT '' COMMENT '通关编码（目前只有韩国需要）',
  `logistics_name` varchar(128) NOT NULL DEFAULT '' COMMENT '物流商',
  `logistics_price` decimal(15,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '物流费用',
  `channel_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '渠道id',
  `label_url` varchar(1024) NOT NULL DEFAULT '' COMMENT '面单地址',
  `shipping_time` datetime DEFAULT NULL COMMENT '订单发货时间',
  `shipping_method` varchar(255) NOT NULL DEFAULT '' COMMENT '发货物流方式',
  `shipping_status` varchar(255) NOT NULL DEFAULT '' COMMENT '物流状态',
  `track_num_time` datetime DEFAULT NULL COMMENT '更新运单号时间',
  `track_num` varchar(255) NOT NULL DEFAULT '' COMMENT '运单号',
  `shipping_price` decimal(15,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '客户支付订单运费',
  `discount_amount` decimal(15,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单优惠金额',
  `coupon_price` decimal(15,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券金额',
  `commission_cost` decimal(10,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '平台佣金',
  `order_source_create_time` datetime DEFAULT NULL COMMENT '订单在平台创建时间',
  `order_pay_time` datetime DEFAULT NULL COMMENT '订单在平台支付时间',
  `surcharge_price` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '订单附加费',
  `total_qty` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '订单总数量',
  `order_price` decimal(15,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单金额',
  `total_price` decimal(15,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单总金额',
  `total_price_rmb` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '订单总金额人民币',
  `currency` char(3) NOT NULL DEFAULT '' COMMENT '订单币种',
  `buyer_first_name` varchar(255) DEFAULT '' COMMENT '买家first名称',
  `buyer_last_name` varchar(255) NOT NULL DEFAULT '' COMMENT '买家last名称',
  `consignee` varchar(255) NOT NULL DEFAULT '' COMMENT '收货人',
  `buyer_post_code` varchar(128) NOT NULL DEFAULT '' COMMENT '买家邮编',
  `buyer_gender` varchar(255) NOT NULL DEFAULT '' COMMENT '买家性别',
  `buyer_phone` varchar(255) NOT NULL DEFAULT '' COMMENT '买家电话',
  `buyer_mobile` varchar(255) NOT NULL DEFAULT '' COMMENT '买家手机',
  `buyer_account` varchar(255) NOT NULL DEFAULT '' COMMENT '买家账号',
  `buyer_fax` varchar(255) NOT NULL DEFAULT '' COMMENT '买家传真',
  `buyer_email` varchar(255) NOT NULL DEFAULT '' COMMENT '买家邮箱',
  `buyer_company` varchar(255) NOT NULL DEFAULT '' COMMENT '买家公司',
  `buyer_country` varchar(255) NOT NULL DEFAULT '' COMMENT '买家国家',
  `buyer_country_code` char(3) NOT NULL DEFAULT '' COMMENT '买家国家编码',
  `buyer_province` varchar(255) NOT NULL DEFAULT '' COMMENT '买家所在省',
  `buyer_city` varchar(255) NOT NULL DEFAULT '' COMMENT '买家所在市',
  `buyer_district` varchar(255) NOT NULL DEFAULT '' COMMENT '买家所在区',
  `buyer_address_1` varchar(255) NOT NULL DEFAULT '' COMMENT '买家地址1',
  `buyer_address_2` varchar(255) NOT NULL DEFAULT '' COMMENT '买家地址2',
  `buyer_address_3` varchar(255) NOT NULL DEFAULT '' COMMENT '买家地址3',
  `platform_remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '平台订单备注',
  `invoice_type` varchar(255) NOT NULL DEFAULT '' COMMENT '发票种类',
  `invoice_title` varchar(255) NOT NULL DEFAULT '' COMMENT '发票抬头',
  `invoice_detail` varchar(255) NOT NULL DEFAULT '' COMMENT '发票内容',
  `warehouse_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '发货仓库，默认一号仓库',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '订单备注',
  `is_flag_sent` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否标记发货，0未标记，1已标记，2不需要标记，3部分标记',
  `sent_time` datetime DEFAULT NULL COMMENT '标记发货时间',
  `ext_json` json DEFAULT NULL COMMENT '扩展字段',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`order_id`) USING BTREE,
  UNIQUE KEY `orders_order_sn` (`order_sn`) USING BTREE,
  KEY `orders_order_no` (`order_no`) USING BTREE,
  KEY `orders_track_num` (`track_num`) USING BTREE,
  KEY `order_source_create_time` (`order_source_create_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=26366 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单表';

-- ----------------------------
-- Records of orders
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for orders_detail
-- ----------------------------
DROP TABLE IF EXISTS `orders_detail`;
CREATE TABLE `orders_detail` (
  `detail_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单id',
  `order_no` varchar(288) NOT NULL DEFAULT '' COMMENT '平台订单号',
  `product_code` varchar(255) NOT NULL DEFAULT '' COMMENT '商品编码',
  `item_id` varchar(128) NOT NULL DEFAULT '' COMMENT '商品id',
  `store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '内部产品id',
  `sku` varchar(128) NOT NULL DEFAULT '' COMMENT '内部sku',
  `platform_sku` varchar(128) NOT NULL DEFAULT '' COMMENT '平台sku',
  `name` varchar(1024) NOT NULL DEFAULT '' COMMENT '平台产品名称',
  `name_ch` varchar(255) NOT NULL DEFAULT '' COMMENT '产品中文名',
  `attr` varchar(255) NOT NULL DEFAULT '' COMMENT '产品属性',
  `qty` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT '产品数量',
  `return_qty` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '退回数量',
  `is_recv` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否收到退货，1收到，0未收到',
  `price` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '产品单价',
  `total_price` decimal(15,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '总价',
  `total_price_rmb` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '订单总金额人民币',
  `discount` decimal(15,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
  `platform_cost` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '平台佣金',
  `image_url` varchar(1024) NOT NULL DEFAULT '' COMMENT '图片',
  `url` varchar(1024) NOT NULL DEFAULT '' COMMENT '商品在平台链接',
  `is_bundle` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否捆绑sku，1是，0否',
  `bdsku` varchar(255) NOT NULL DEFAULT '' COMMENT '捆绑sku,以英文逗号分隔',
  `declare_en` varchar(1024) NOT NULL DEFAULT '' COMMENT '报关英文名称',
  `declare_ch` varchar(1024) NOT NULL DEFAULT '' COMMENT '报关中文名称',
  `declare_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '申报价格(美金)',
  `declare_weight` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '申报重量(g)',
  `customer_remark` varchar(255) NOT NULL DEFAULT '' COMMENT '客户备注',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '内部备注',
  `is_cancel` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否取消，0否，1是',
  `ext_json` json DEFAULT NULL COMMENT '扩展字段',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`detail_id`) USING BTREE,
  KEY `orders_detail_sku` (`sku`) USING BTREE,
  KEY `orders_detail_platform_sku` (`platform_sku`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=27127 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单详情表';

-- ----------------------------
-- Records of orders_detail
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for orders_return
-- ----------------------------
DROP TABLE IF EXISTS `orders_return`;
CREATE TABLE `orders_return` (
  `rid` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `order_id` int(11) unsigned NOT NULL COMMENT '订单id',
  `out_id` int(11) unsigned NOT NULL COMMENT '发货仓库',
  `in_id` int(11) DEFAULT NULL COMMENT '退货仓库',
  `track_num` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '追踪号',
  `track_status` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '物流状态',
  `currency` char(3) NOT NULL DEFAULT '' COMMENT '订单币种',
  `logistics_price` decimal(10,4) NOT NULL DEFAULT '0.0000' COMMENT '退货运费',
  `channel_id` int(11) DEFAULT NULL COMMENT '退货渠道',
  `channel_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '渠道名称',
  `track_info` text CHARACTER SET utf8 COLLATE utf8_unicode_ci COMMENT '物流信息',
  `return_info` json DEFAULT NULL COMMENT '退货详情',
  `send_time` datetime DEFAULT NULL COMMENT '发货时间',
  `remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `create_by` int(11) NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`rid`) USING BTREE,
  KEY `order_return_track_num` (`track_num`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单退货表';

-- ----------------------------
-- Records of orders_return
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for orders_temp
-- ----------------------------
DROP TABLE IF EXISTS `orders_temp`;
CREATE TABLE `orders_temp` (
  `temp_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `order_no` varchar(255) NOT NULL COMMENT '平台订单号',
  `account_id` int(11) unsigned NOT NULL COMMENT '账号ID',
  `site` varchar(3) NOT NULL COMMENT '站点',
  `is_sync_order` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否同步到订单表，1已同步，0未同步',
  `sync_time` datetime DEFAULT NULL COMMENT '同步时间',
  `order_info` json NOT NULL COMMENT '订单内容',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`temp_id`) USING BTREE,
  KEY `order_order_sn` (`order_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=371 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='临时订单表';

-- ----------------------------
-- Records of orders_temp
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for platform_publish
-- ----------------------------
DROP TABLE IF EXISTS `platform_publish`;
CREATE TABLE `platform_publish` (
  `publish_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `product_id` int(11) unsigned NOT NULL COMMENT '产品id',
  `user_id` int(11) unsigned NOT NULL COMMENT '用户id',
  `account_id` int(11) unsigned NOT NULL COMMENT '刊登账号id',
  `platfrom_name` varchar(255) NOT NULL DEFAULT '' COMMENT '刊登平台',
  `country` varchar(255) NOT NULL DEFAULT '' COMMENT '国家',
  `url` varchar(1024) NOT NULL COMMENT '刊登地址',
  `header` json DEFAULT NULL COMMENT '请求头信息',
  `body` longtext NOT NULL COMMENT '生成好的请求体',
  `publish_time` int(11) NOT NULL COMMENT '发布时间戳',
  `finish_time` datetime DEFAULT NULL COMMENT '刊登成功时间',
  `status` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '刊登状态，0等待刊登，10刊登中，20成功，30失败, 40等待审核',
  `error_num` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '失败次数',
  `error_msg` text COMMENT '错误信息',
  `success_msg` text COMMENT '成功信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`publish_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='刊登表';

-- ----------------------------
-- Records of platform_publish
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for producer
-- ----------------------------
DROP TABLE IF EXISTS `producer`;
CREATE TABLE `producer` (
  `producer_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '供应商名称',
  `code` varchar(64) NOT NULL DEFAULT '' COMMENT '供应商编码',
  `address` varchar(1024) NOT NULL DEFAULT '' COMMENT '供应商地址',
  `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '供应商类型：0.线下，1.线上，2.代工，3中间商',
  `platform` varchar(255) NOT NULL DEFAULT '' COMMENT '线上平台',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否可用，1是，0否',
  `pay_type` tinyint(2) NOT NULL COMMENT '付款方式',
  `max_money` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '限制月最大采购金额，0不限制',
  `bank` varchar(255) NOT NULL DEFAULT '' COMMENT '银行',
  `bank_address` varchar(1024) NOT NULL DEFAULT '' COMMENT '银行地址',
  `bank_user` varchar(128) NOT NULL DEFAULT '' COMMENT '户名',
  `account` varchar(32) NOT NULL DEFAULT '' COMMENT '银行账号',
  `before_pay` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '预付款，百分比',
  `credit_day` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '账期天数',
  `site` varchar(255) NOT NULL DEFAULT '' COMMENT '网站',
  `is_invoice` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否可开发票',
  `is_free_tax` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否包税',
  `total_price` decimal(15,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '共采购金额',
  `delivery_day` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '交货时间（天）',
  `quality` smallint(3) unsigned NOT NULL DEFAULT '1' COMMENT '供应商质量分数',
  `main_product` varchar(1024) NOT NULL DEFAULT '' COMMENT '主营商品',
  `contacts` varchar(128) NOT NULL DEFAULT '' COMMENT '联系人',
  `mobile` varchar(32) NOT NULL DEFAULT '' COMMENT '手机',
  `phone` varchar(32) NOT NULL DEFAULT '' COMMENT '电话',
  `wangwang` varchar(255) NOT NULL DEFAULT '' COMMENT '阿里旺旺',
  `qq` varchar(32) NOT NULL DEFAULT '' COMMENT 'qq',
  `spare_contacts` varchar(128) NOT NULL DEFAULT '' COMMENT '备用联系人',
  `spare_mobile` varchar(32) NOT NULL DEFAULT '' COMMENT '备用联系人手机',
  `spare_phone` varchar(32) NOT NULL DEFAULT '' COMMENT '备用联系人电话',
  `spare_qq` varchar(32) NOT NULL DEFAULT '' COMMENT '备用联系人qq',
  `sort` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `certificate` varchar(1024) NOT NULL DEFAULT '' COMMENT '供应商资质',
  `remark` text COMMENT '备注信息',
  `ext_json` json DEFAULT NULL COMMENT '扩展字段',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`producer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='供应商表';

-- ----------------------------
-- Records of producer
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product
-- ----------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
  `product_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `brand` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '品牌',
  `model` varchar(255) NOT NULL DEFAULT '' COMMENT '型号',
  `unit_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '计量单位',
  `category_id` int(11) NOT NULL COMMENT '分类id',
  `spu` varchar(64) NOT NULL DEFAULT '' COMMENT '商品SPU码',
  `name_ch` varchar(255) NOT NULL DEFAULT '' COMMENT '中文名称',
  `name_en` varchar(255) NOT NULL DEFAULT '' COMMENT '英文名称',
  `describe` text COMMENT '描述信息',
  `status` smallint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态，1可用，10禁用，20部分平台禁用，30无货源，40新品开发',
  `image_url` varchar(1024) NOT NULL DEFAULT '' COMMENT '封面图',
  `default_purchase` varchar(255) NOT NULL DEFAULT '' COMMENT '默认商品供应商',
  `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '默认采购价格',
  `hs_code` varchar(128) NOT NULL DEFAULT '' COMMENT '海关编码',
  `declare_ch` varchar(1024) NOT NULL DEFAULT '' COMMENT '申报中文名',
  `declare_en` varchar(1024) NOT NULL DEFAULT '' COMMENT '申报英文名',
  `declare_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '申报价格(美金)',
  `hot` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '产品热度',
  `tags` varchar(1024) NOT NULL DEFAULT '' COMMENT '商品标签',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `ext_json` json DEFAULT NULL COMMENT '扩展字段',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`product_id`) USING BTREE,
  UNIQUE KEY `product_spu` (`spu`) USING BTREE,
  KEY `product_name_ch` (`name_ch`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=301 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='产品表';

-- ----------------------------
-- Records of product
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_amazon_box
-- ----------------------------
DROP TABLE IF EXISTS `product_amazon_box`;
CREATE TABLE `product_amazon_box` (
  `box_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `account_id` int(11) unsigned DEFAULT NULL COMMENT '账号id',
  `path_pdf` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '' COMMENT '平台PDF文件',
  `name_pdf` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'PDF文件名',
  `total_box` mediumint(8) unsigned DEFAULT '1' COMMENT '总箱数',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用，1可用，0不可用',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  PRIMARY KEY (`box_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='亚马逊箱唛';

-- ----------------------------
-- Records of product_amazon_box
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_attr
-- ----------------------------
DROP TABLE IF EXISTS `product_attr`;
CREATE TABLE `product_attr` (
  `attr_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `product_id` int(11) unsigned NOT NULL COMMENT '产品id',
  `spec_id` int(11) NOT NULL DEFAULT '0' COMMENT '属性id',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '属性名',
  `value` varchar(255) NOT NULL DEFAULT '' COMMENT '属性值',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否可用，1是，0否',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`attr_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1547 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='产品属性表';

-- ----------------------------
-- Records of product_attr
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_brand
-- ----------------------------
DROP TABLE IF EXISTS `product_brand`;
CREATE TABLE `product_brand` (
  `brand_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `name_ch` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '中文名',
  `name_en` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '英文名',
  `logo_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '品牌LOGO',
  `is_auth` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否授权：1是，0否',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用，1启用，0关闭',
  `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '品牌类型',
  `remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `sort` smallint(5) NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`brand_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='品牌管理';

-- ----------------------------
-- Records of product_brand
-- ----------------------------
BEGIN;
INSERT INTO `product_brand` VALUES (9, '其它', '', '', 1, 1, '', '', 0);
COMMIT;

-- ----------------------------
-- Table structure for product_category
-- ----------------------------
DROP TABLE IF EXISTS `product_category`;
CREATE TABLE `product_category` (
  `cate_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `parent_id` int(11) unsigned DEFAULT '0' COMMENT '父分类',
  `name` varchar(64) NOT NULL COMMENT '分类名',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '是否可用，1是，0否',
  PRIMARY KEY (`cate_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='产品库分类';

-- ----------------------------
-- Records of product_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_image
-- ----------------------------
DROP TABLE IF EXISTS `product_image`;
CREATE TABLE `product_image` (
  `image_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `product_id` int(11) unsigned NOT NULL COMMENT '产品id',
  `image_url` varchar(1024) NOT NULL DEFAULT '' COMMENT '图片路径',
  `width` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '图片宽度 px',
  `height` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '图片高度 px',
  `size` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '图片大小 kb',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否可用，1是，0否',
  `sort` tinyint(3) NOT NULL DEFAULT '1' COMMENT '排序',
  PRIMARY KEY (`image_id`) USING BTREE,
  KEY `product_image_index` (`image_url`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2170 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='产品图片表';

-- ----------------------------
-- Records of product_image
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_keyword
-- ----------------------------
DROP TABLE IF EXISTS `product_keyword`;
CREATE TABLE `product_keyword` (
  `word_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `cate_id` int(11) NOT NULL COMMENT '关键词分类id',
  `word` varchar(255) NOT NULL COMMENT '关键词',
  `type` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '关键词类型，0普通，10敏感词，20热词',
  `used` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '使用频率',
  `hot` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '关键词热度',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用，1启用，0关闭',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`word_id`) USING BTREE,
  UNIQUE KEY `product_keyword_word` (`word`,`cate_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='关键词';

-- ----------------------------
-- Records of product_keyword
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_keyword_category
-- ----------------------------
DROP TABLE IF EXISTS `product_keyword_category`;
CREATE TABLE `product_keyword_category` (
  `cate_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `parent_id` int(11) unsigned DEFAULT '0' COMMENT '父分类',
  `name` varchar(64) NOT NULL COMMENT '分类名',
  `status` tinyint(1) unsigned DEFAULT '1' COMMENT '是否可用，1是，0否',
  PRIMARY KEY (`cate_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='关键词分类';

-- ----------------------------
-- Records of product_keyword_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_platform_barcode
-- ----------------------------
DROP TABLE IF EXISTS `product_platform_barcode`;
CREATE TABLE `product_platform_barcode` (
  `barcode_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自动id',
  `account_id` int(11) unsigned NOT NULL COMMENT '账号',
  `sku` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '产品SKU',
  `image_url` varchar(1024) NOT NULL DEFAULT '' COMMENT '图片路径',
  `name_ch` varchar(255) NOT NULL DEFAULT '' COMMENT '中文名称',
  `path_pdf` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '平台PDF文件',
  `merge_path_pdf` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '合并后PDF文件',
  `is_merge` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否合并',
  `merge_text` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '需要合并的文字',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用，1可用，0不可用',
  `sort` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  PRIMARY KEY (`barcode_id`) USING BTREE,
  KEY `barcode_sku` (`sku`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='平台条码';

-- ----------------------------
-- Records of product_platform_barcode
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_platform_sku
-- ----------------------------
DROP TABLE IF EXISTS `product_platform_sku`;
CREATE TABLE `product_platform_sku` (
  `pid` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `product_id` int(11) NOT NULL COMMENT '产品id',
  `store_id` int(11) unsigned NOT NULL COMMENT '变体id',
  `sku` varchar(255) NOT NULL DEFAULT '' COMMENT 'sku',
  `platform_sku` varchar(255) NOT NULL DEFAULT '' COMMENT '平台sku',
  `account_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '店铺id',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用，1启用，0关闭',
  `ext_json` json DEFAULT NULL COMMENT '扩展字段',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  PRIMARY KEY (`pid`) USING BTREE,
  KEY `platform_sku` (`platform_sku`) USING BTREE,
  KEY `platform_store_sku` (`sku`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1268 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='平台sku和内部产品映射';

-- ----------------------------
-- Records of product_platform_sku
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_purchase
-- ----------------------------
DROP TABLE IF EXISTS `product_purchase`;
CREATE TABLE `product_purchase` (
  `pp_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `product_id` int(11) unsigned NOT NULL COMMENT '产品id',
  `store_id` int(11) NOT NULL DEFAULT '0' COMMENT '变体id',
  `producer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '供应商id，如果为0刚不对应供应商',
  `producer_name` varchar(255) NOT NULL DEFAULT '' COMMENT '供应商名称',
  `min_qty` mediumint(8) unsigned NOT NULL DEFAULT '1' COMMENT '起订数量',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否可用，1是，0否',
  `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '采购类型，1线上，0线下',
  `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '采购单价',
  `url` varchar(1024) NOT NULL DEFAULT '' COMMENT '链接',
  `predict_day` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '预计到货天数',
  `start_weight_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '起重物流费用',
  `is_default` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否优先采购，1是，0否',
  `remark` text COMMENT '备注信息',
  `ext_json` json DEFAULT NULL COMMENT '扩展字段',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`pp_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=305 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='产品采购详情';

-- ----------------------------
-- Records of product_purchase
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_spec
-- ----------------------------
DROP TABLE IF EXISTS `product_spec`;
CREATE TABLE `product_spec` (
  `spec_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `name_ch` varchar(255) NOT NULL DEFAULT '' COMMENT '分类中文名称',
  `type` varchar(255) NOT NULL DEFAULT '' COMMENT '属性类别',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '中文名称',
  `value` varchar(255) NOT NULL DEFAULT '' COMMENT '属性值',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用，1启用，0关闭',
  `sort` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`spec_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=89 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='产品规格';

-- ----------------------------
-- Records of product_spec
-- ----------------------------
BEGIN;
INSERT INTO `product_spec` VALUES (1, '衣服', 'clothes_size', 'XS', 'XS', 1, 12);
INSERT INTO `product_spec` VALUES (2, '鞋子', 'shoe_size', '34码', '34', 1, 0);
INSERT INTO `product_spec` VALUES (4, '衣服', 'clothes_size', 'S', 'S', 1, 11);
INSERT INTO `product_spec` VALUES (5, '衣服', 'clothes_size', 'M', 'M', 1, 10);
INSERT INTO `product_spec` VALUES (6, '衣服', 'clothes_size', 'L', 'L', 1, 9);
INSERT INTO `product_spec` VALUES (7, '衣服', 'clothes_size', 'XL', 'XL', 1, 8);
INSERT INTO `product_spec` VALUES (8, '衣服', 'clothes_size', 'XXL', 'XXL', 1, 7);
INSERT INTO `product_spec` VALUES (9, '衣服', 'clothes_size', 'XXXL', 'XXXL', 1, 6);
INSERT INTO `product_spec` VALUES (10, '鞋子', 'shoe_size', '35码', '35', 1, 0);
INSERT INTO `product_spec` VALUES (11, '鞋子', 'shoe_size', '36码', '36', 1, 0);
INSERT INTO `product_spec` VALUES (12, '鞋子', 'shoe_size', '37码', '37', 1, 0);
INSERT INTO `product_spec` VALUES (13, '鞋子', 'shoe_size', '38码', '38', 1, 0);
INSERT INTO `product_spec` VALUES (14, '鞋子', 'shoe_size', '39码', '39', 1, 0);
INSERT INTO `product_spec` VALUES (15, '鞋子', 'shoe_size', '40码', '40', 1, 0);
INSERT INTO `product_spec` VALUES (16, '鞋子', 'shoe_size', '41码', '41', 1, 0);
INSERT INTO `product_spec` VALUES (17, '鞋子', 'shoe_size', '42码', '42', 1, 0);
INSERT INTO `product_spec` VALUES (18, '鞋子', 'shoe_size', '43码', '43', 1, 0);
INSERT INTO `product_spec` VALUES (19, '鞋子', 'shoe_size', '44码', '44', 1, 0);
INSERT INTO `product_spec` VALUES (20, '鞋子', 'shoe_size', '45码', '45', 1, 0);
INSERT INTO `product_spec` VALUES (21, '颜色', 'color', '红色', 'Red', 1, 0);
INSERT INTO `product_spec` VALUES (22, '颜色', 'color', '朱红', 'Vermeil', 1, 0);
INSERT INTO `product_spec` VALUES (23, '颜色', 'color', '粉红', 'Pink', 1, 0);
INSERT INTO `product_spec` VALUES (24, '颜色', 'color', '梅红', 'Plum', 1, 0);
INSERT INTO `product_spec` VALUES (25, '颜色', 'color', '玫瑰红', 'Rose Madder', 1, 0);
INSERT INTO `product_spec` VALUES (26, '颜色', 'color', '桃红', 'Peach Blossom', 1, 0);
INSERT INTO `product_spec` VALUES (27, '颜色', 'color', '樱桃红', 'Cherry', 1, 0);
INSERT INTO `product_spec` VALUES (28, '颜色', 'color', '桔红', 'Reddish Orange', 1, 0);
INSERT INTO `product_spec` VALUES (29, '颜色', 'color', '石榴红', 'Garnet', 1, 0);
INSERT INTO `product_spec` VALUES (30, '颜色', 'color', '枣红', 'Purplish Red', 1, 0);
INSERT INTO `product_spec` VALUES (31, '颜色', 'color', '橙色', 'Orange', 1, 0);
INSERT INTO `product_spec` VALUES (32, '颜色', 'color', '黄色', 'Yellow', 1, 0);
INSERT INTO `product_spec` VALUES (33, '颜色', 'color', '绿色', 'Green', 1, 0);
INSERT INTO `product_spec` VALUES (34, '颜色', 'color', '青色', 'Cerulean Blue', 1, 0);
INSERT INTO `product_spec` VALUES (35, '颜色', 'color', '蓝色', 'Blue', 1, 0);
INSERT INTO `product_spec` VALUES (36, '颜色', 'color', '紫色', 'Purple', 1, 0);
INSERT INTO `product_spec` VALUES (37, '颜色', 'color', '紫罗兰色', 'Violet', 1, 0);
INSERT INTO `product_spec` VALUES (38, '颜色', 'color', '黑色', 'Black', 1, 0);
INSERT INTO `product_spec` VALUES (39, '颜色', 'color', '白色', 'White', 1, 0);
INSERT INTO `product_spec` VALUES (40, '颜色', 'color', '珍珠白', 'Pear White', 1, 0);
INSERT INTO `product_spec` VALUES (41, '颜色', 'color', '银白', 'Silver White', 1, 0);
INSERT INTO `product_spec` VALUES (42, '颜色', 'color', '灰色', 'Grey', 1, 0);
INSERT INTO `product_spec` VALUES (43, '颜色', 'color', '银灰', 'Silver Grey', 1, 0);
INSERT INTO `product_spec` VALUES (44, '颜色', 'color', '棕色', 'Brown', 1, 0);
INSERT INTO `product_spec` VALUES (45, '颜色', 'color', '赤褐', 'Sorrel', 1, 0);
INSERT INTO `product_spec` VALUES (46, '颜色', 'color', '棕褐', 'Summer Tan', 1, 0);
INSERT INTO `product_spec` VALUES (47, '颜色', 'color', '咖啡色', 'Coffee', 1, 0);
INSERT INTO `product_spec` VALUES (48, '颜色', 'color', '金色', 'Gold', 1, 0);
INSERT INTO `product_spec` VALUES (49, '颜色', 'color', '银色', 'Silver', 1, 0);
INSERT INTO `product_spec` VALUES (50, '颜色', 'color', '黄铜色', 'Brassiness', 1, 0);
INSERT INTO `product_spec` VALUES (51, '颜色', 'color', '米色', 'Beige', 1, 0);
INSERT INTO `product_spec` VALUES (52, '颜色', 'color', '奶油色', 'Cream', 1, 0);
INSERT INTO `product_spec` VALUES (53, '颜色', 'color', '肉色', 'Flesh', 1, 0);
INSERT INTO `product_spec` VALUES (54, '颜色', 'color', '水晶色', 'Crystal', 1, 0);
INSERT INTO `product_spec` VALUES (55, '颜色', 'color', '彩虹色', 'Iris', 1, 0);
INSERT INTO `product_spec` VALUES (58, '衣服', 'clothes_size', 'XXS', 'XXS', 1, 16);
INSERT INTO `product_spec` VALUES (59, '衣服', 'clothes_size', '60码', '60', 1, 50);
INSERT INTO `product_spec` VALUES (60, '衣服', 'clothes_size', '70码', '70', 1, 49);
INSERT INTO `product_spec` VALUES (61, '衣服', 'clothes_size', '80码', '80', 1, 48);
INSERT INTO `product_spec` VALUES (62, '衣服', 'clothes_size', '90码', '90', 1, 47);
INSERT INTO `product_spec` VALUES (63, '衣服', 'clothes_size', '95码', '95', 1, 46);
INSERT INTO `product_spec` VALUES (64, '衣服', 'clothes_size', '100码', '100', 1, 45);
INSERT INTO `product_spec` VALUES (65, '衣服', 'clothes_size', '110码', '110', 1, 44);
INSERT INTO `product_spec` VALUES (66, '衣服', 'clothes_size', '120码', '120', 1, 43);
INSERT INTO `product_spec` VALUES (67, '衣服', 'clothes_size', '130码', '130', 1, 42);
INSERT INTO `product_spec` VALUES (68, '衣服', 'color', '浅灰色', 'Light Grey', 1, 0);
INSERT INTO `product_spec` VALUES (69, '衣服', 'color', '深灰色', 'Dark Grey', 1, 0);
INSERT INTO `product_spec` VALUES (70, '衣服', 'color', '军绿色', 'Army Green', 1, 0);
INSERT INTO `product_spec` VALUES (71, '衣服', 'color', '棕色白色', 'Brown White', 1, 0);
INSERT INTO `product_spec` VALUES (72, '衣服', 'color', '棕色黑色', 'Brown Black', 1, 0);
INSERT INTO `product_spec` VALUES (73, '衣服', 'color', '白色黑色', 'White Black', 1, 0);
INSERT INTO `product_spec` VALUES (74, '衣服', 'clothes_size', '59码', '59', 1, 56);
INSERT INTO `product_spec` VALUES (75, '衣服', 'clothes_size', '66码', '66', 1, 55);
INSERT INTO `product_spec` VALUES (76, '衣服', 'clothes_size', '73码', '73', 1, 52);
INSERT INTO `product_spec` VALUES (77, '衣服', 'color', '酒红色', 'Red Wine', 1, 0);
INSERT INTO `product_spec` VALUES (78, '衣服', 'clothes_size', '68码', '68', 1, 54);
INSERT INTO `product_spec` VALUES (79, '衣服', 'clothes_size', '74码', '74', 1, 53);
INSERT INTO `product_spec` VALUES (80, '衣服', 'clothes_size', '86码', '86', 1, 51);
INSERT INTO `product_spec` VALUES (81, '衣服', 'color', '杏色', 'apricot', 1, 0);
INSERT INTO `product_spec` VALUES (82, '衣服', 'color', '浅蓝色', 'Light Blue', 1, 0);
INSERT INTO `product_spec` VALUES (83, '衣服', 'color', '砖红色', 'Brick Red', 1, 0);
INSERT INTO `product_spec` VALUES (84, '衣服', 'color', '浅绿色', 'Light Green', 1, 0);
INSERT INTO `product_spec` VALUES (85, '衣服', 'color', '天蓝色', 'Sky Blue', 1, 0);
INSERT INTO `product_spec` VALUES (86, '颜色', 'color', '深蓝', 'Dark Blue', 1, 0);
INSERT INTO `product_spec` VALUES (87, '颜色', 'color', '酒红色', 'Red Wine', 1, 0);
INSERT INTO `product_spec` VALUES (88, '化妆品', 'floz', '毫升', '250', 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for product_store
-- ----------------------------
DROP TABLE IF EXISTS `product_store`;
CREATE TABLE `product_store` (
  `store_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `product_id` int(11) NOT NULL COMMENT '产品id',
  `sku` varchar(255) NOT NULL DEFAULT '' COMMENT 'sku编码',
  `length` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '长mm',
  `width` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '宽mm',
  `height` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '高mm',
  `weight` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '净重(g)',
  `package_weight` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '包装重(g)',
  `price` decimal(10,2) DEFAULT '0.00' COMMENT '变体采购价格',
  `image_url` varchar(1024) NOT NULL DEFAULT '' COMMENT '图片路径',
  `attr` varchar(255) NOT NULL DEFAULT '' COMMENT '属性',
  `color` varchar(255) NOT NULL DEFAULT '' COMMENT '颜色',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`store_id`) USING BTREE,
  UNIQUE KEY `product_store_sku` (`sku`(64)) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1971 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='产品库详情表';

-- ----------------------------
-- Records of product_store
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_translate
-- ----------------------------
DROP TABLE IF EXISTS `product_translate`;
CREATE TABLE `product_translate` (
  `translate_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `product_id` int(11) NOT NULL COMMENT '产品id',
  `target_lang` varchar(16) NOT NULL COMMENT '目标语言，语言代码',
  `source_lang` varchar(16) NOT NULL COMMENT '源语言，语言代码',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '产品名称',
  `describe` text COMMENT '描述信息',
  `declare` varchar(1024) NOT NULL DEFAULT '' COMMENT '申报名称',
  `attr` json NOT NULL COMMENT '产品属性',
  `type` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否为人工翻译，0自动翻译，10人工翻译',
  `ext_json` json DEFAULT NULL COMMENT '扩展字段',
  `remark` text COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`translate_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='产品表翻译';

-- ----------------------------
-- Records of product_translate
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_unit
-- ----------------------------
DROP TABLE IF EXISTS `product_unit`;
CREATE TABLE `product_unit` (
  `unit_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `code` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '编码',
  `name_ch` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '中文名',
  `name_en` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '英文名',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用，1启用，0关闭',
  `sort` smallint(5) NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`unit_id`) USING BTREE,
  UNIQUE KEY `product_unit_unique` (`name_ch`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='产品单位表';

-- ----------------------------
-- Records of product_unit
-- ----------------------------
BEGIN;
INSERT INTO `product_unit` VALUES (1, '', '个', '', 1, 0);
INSERT INTO `product_unit` VALUES (2, '', '条', '', 1, 0);
INSERT INTO `product_unit` VALUES (3, '', '桶', '', 1, 0);
INSERT INTO `product_unit` VALUES (4, '', '瓶', '', 1, 0);
INSERT INTO `product_unit` VALUES (5, '', '支', '', 1, 0);
INSERT INTO `product_unit` VALUES (6, '', '包', '', 1, 0);
INSERT INTO `product_unit` VALUES (7, '', '副', '', 1, 0);
INSERT INTO `product_unit` VALUES (8, '', '箱', '', 1, 0);
INSERT INTO `product_unit` VALUES (9, '', '盒', '', 1, 0);
INSERT INTO `product_unit` VALUES (10, '', '把', '', 1, 0);
INSERT INTO `product_unit` VALUES (11, '', '套', '', 1, 201);
INSERT INTO `product_unit` VALUES (12, '', '提', '', 1, 0);
INSERT INTO `product_unit` VALUES (13, '', '袋', '', 1, 0);
INSERT INTO `product_unit` VALUES (14, '', '台', '', 1, 0);
INSERT INTO `product_unit` VALUES (15, '', '卷', '', 1, 0);
INSERT INTO `product_unit` VALUES (16, '', '只', '', 1, 0);
INSERT INTO `product_unit` VALUES (17, '', '块', '', 1, 0);
INSERT INTO `product_unit` VALUES (18, '', '双', '', 1, 0);
INSERT INTO `product_unit` VALUES (19, '', '件', '', 1, 200);
INSERT INTO `product_unit` VALUES (20, '', '升', '', 1, 0);
INSERT INTO `product_unit` VALUES (21, '', '根', '', 1, 0);
INSERT INTO `product_unit` VALUES (22, '', '杯', '', 1, 0);
INSERT INTO `product_unit` VALUES (23, '', '组', '', 1, 0);
INSERT INTO `product_unit` VALUES (24, '', '张', '', 1, 0);
INSERT INTO `product_unit` VALUES (25, '', '罐', '', 1, 0);
INSERT INTO `product_unit` VALUES (26, '', '串', '', 1, 0);
INSERT INTO `product_unit` VALUES (27, '', '片', '', 1, 0);
INSERT INTO `product_unit` VALUES (28, '', '本', '', 1, 0);
INSERT INTO `product_unit` VALUES (29, '', '辆', '', 1, 0);
INSERT INTO `product_unit` VALUES (30, '', '捆', '', 1, 0);
INSERT INTO `product_unit` VALUES (31, '', '卡', '', 1, 0);
INSERT INTO `product_unit` VALUES (32, '', '听', '', 1, 0);
INSERT INTO `product_unit` VALUES (33, '', '付', '', 1, 0);
INSERT INTO `product_unit` VALUES (34, '', '斤', '', 1, 0);
INSERT INTO `product_unit` VALUES (35, '', '排', '', 1, 0);
INSERT INTO `product_unit` VALUES (36, '', '粒', '', 1, 0);
INSERT INTO `product_unit` VALUES (37, '', '板', '', 1, 0);
INSERT INTO `product_unit` VALUES (38, '', '筒', '', 1, 0);
INSERT INTO `product_unit` VALUES (39, '', '对', '', 1, 0);
INSERT INTO `product_unit` VALUES (40, '', '打', '', 1, 0);
INSERT INTO `product_unit` VALUES (41, 'mm', '平方', '', 1, 0);
INSERT INTO `product_unit` VALUES (42, '', '面', '', 1, 0);
INSERT INTO `product_unit` VALUES (43, 'g', '克', '', 1, 0);
INSERT INTO `product_unit` VALUES (44, 'kg', '千克', '', 1, 0);
INSERT INTO `product_unit` VALUES (45, 't', '吨', '', 1, 0);
INSERT INTO `product_unit` VALUES (46, 'mm', '毫米', '', 1, 0);
INSERT INTO `product_unit` VALUES (47, 'cm', '厘米', '', 1, 0);
INSERT INTO `product_unit` VALUES (48, 'm', '米', 'meter', 1, 125);
INSERT INTO `product_unit` VALUES (49, 'km', '千米', '', 1, 125);
COMMIT;

-- ----------------------------
-- Table structure for purchase
-- ----------------------------
DROP TABLE IF EXISTS `purchase`;
CREATE TABLE `purchase` (
  `purchase_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `purchase_sn` varchar(255) NOT NULL DEFAULT '' COMMENT '采购单号',
  `producer_sn` varchar(255) NOT NULL DEFAULT '' COMMENT '供应商订单号',
  `buyer_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '采购人',
  `order_status` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '采购单状态，0待处理，10采购建议，20取消，30采购中，40供应商出库，50运输中，60采购到货，70质检中，80采购异常，90退货，100换货，110补发，120入库中，130入库异常，140待上架，150部分入库，160全部入库，170核销中，180核销异常，190核销完成',
  `check_status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '审核状态',
  `pay_type` tinyint(2) DEFAULT NULL COMMENT '付款方式',
  `pay_status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '付款状态',
  `amo_money` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '采购金额',
  `total_money` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '总金额',
  `pro_money` decimal(10,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '供应商承担费用',
  `pay_money` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '已付金额',
  `total_qty` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '采购总数量',
  `logistics_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '物流费用',
  `estimate_date` date DEFAULT NULL COMMENT '预计到货时间',
  `business_date` datetime DEFAULT NULL COMMENT '下单时间',
  `delivery_date` date DEFAULT NULL COMMENT '交货日期',
  `recv_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '收货人',
  `recv_date` datetime DEFAULT NULL COMMENT '到货日期',
  `finish_date` datetime DEFAULT NULL COMMENT '完成日期',
  `credit_day` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '账期时间（天）',
  `is_invoice` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否开发票，1是，0否',
  `tax` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '税',
  `warehouse_id` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '调入仓库',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `contacts` varchar(128) NOT NULL DEFAULT '' COMMENT '联系人',
  `phone` varchar(128) NOT NULL DEFAULT '' COMMENT '电话',
  `address` varchar(255) NOT NULL DEFAULT '' COMMENT '收货地址',
  `producer_id` int(11) NOT NULL COMMENT '供应商id',
  `producer_name` varchar(255) NOT NULL DEFAULT '' COMMENT '供应商名称',
  `ext_json` json DEFAULT NULL COMMENT '扩展字段',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`purchase_id`) USING BTREE,
  UNIQUE KEY `purchase_sn` (`purchase_sn`) USING BTREE,
  KEY `producer_sn` (`producer_sn`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='采购表';

-- ----------------------------
-- Records of purchase
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for purchase_exception
-- ----------------------------
DROP TABLE IF EXISTS `purchase_exception`;
CREATE TABLE `purchase_exception` (
  `eid` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `purchase_id` int(11) NOT NULL COMMENT '采购id',
  `sku` varchar(255) NOT NULL COMMENT '异常SKU',
  `exception_type` smallint(3) unsigned NOT NULL COMMENT '异常类型，10缺少数量，20损坏，30次品，40来货不符，50临近过期',
  `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '处理人',
  `dispose_result` smallint(3) NOT NULL DEFAULT '0' COMMENT '处理结果，0未处理，10退钱不退货，20退钱退货，30换货，40补发，50无异常，60确认异常',
  `remark` text COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`eid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='采购异常表';

-- ----------------------------
-- Records of purchase_exception
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for purchase_exchange
-- ----------------------------
DROP TABLE IF EXISTS `purchase_exchange`;
CREATE TABLE `purchase_exchange` (
  `exchange_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `purchase_id` int(11) NOT NULL COMMENT '采购id',
  `producer_id` int(11) NOT NULL COMMENT '供应商',
  `exchange_sn` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '采购换货单号',
  `producer_name` varchar(255) NOT NULL DEFAULT '' COMMENT '供应商名称',
  `warehouse_id` int(11) unsigned NOT NULL COMMENT '换货仓库',
  `is_spread` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否需要补差价，1需要，0不需要',
  `money` decimal(15,4) NOT NULL DEFAULT '0.0000' COMMENT '差价金额，负需要付，正需要收',
  `is_pay` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '收付状态',
  `express_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '快递id',
  `logistics_name` varchar(128) NOT NULL DEFAULT '' COMMENT '快递公司',
  `logistics_price` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '需要支付的运费',
  `track_num` varchar(128) NOT NULL DEFAULT '' COMMENT '追踪号',
  `check_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '审核状态',
  `is_auto` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否自动生成，1系统生成，0手动生成',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '换货状态，0待处理，10占用库存，20待出库，30已出库，40已签收，50取消',
  `desc` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '换货原因',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`exchange_id`) USING BTREE,
  UNIQUE KEY `purchase_exchange_sn` (`exchange_sn`) USING BTREE,
  KEY `purchase_exchange_track_num` (`track_num`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='采购换货表';

-- ----------------------------
-- Records of purchase_exchange
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for purchase_info
-- ----------------------------
DROP TABLE IF EXISTS `purchase_info`;
CREATE TABLE `purchase_info` (
  `info_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `purchase_id` int(11) unsigned NOT NULL COMMENT '采购id',
  `store_id` int(11) NOT NULL COMMENT '商品id',
  `name_ch` varchar(255) NOT NULL DEFAULT '' COMMENT '产品名称',
  `unit` varchar(32) NOT NULL DEFAULT '' COMMENT '货物单位',
  `sku` varchar(255) NOT NULL COMMENT 'sku编码',
  `qty` mediumint(8) unsigned NOT NULL DEFAULT '1' COMMENT '采购数量',
  `price` decimal(15,4) NOT NULL DEFAULT '0.0000' COMMENT '采购单价',
  `stock_qty` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '已入库数量',
  `store_qty` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '到货数量',
  `n_store_qty` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '未到货数量',
  `return_qty` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '退货数量',
  `exce_qty` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '确认异常数量',
  `store_status` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '入库状态，0待入库，10质检中，20异常，30退货，40换货，50补发，60入库中，70待上架，80部分入库，90全部入库',
  `image_url` varchar(1024) NOT NULL DEFAULT '' COMMENT '图片路径',
  `url` varchar(255) NOT NULL DEFAULT '' COMMENT '采购链接',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`info_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=151 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='采购订单明细';

-- ----------------------------
-- Records of purchase_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for purchase_log
-- ----------------------------
DROP TABLE IF EXISTS `purchase_log`;
CREATE TABLE `purchase_log` (
  `log_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `purchase_id` int(11) unsigned NOT NULL COMMENT '采购id',
  `action` varchar(255) NOT NULL COMMENT '操作类型',
  `before_data` text COMMENT '操作前数据',
  `after_data` text COMMENT '操作后数据',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
  `create_by` int(11) unsigned NOT NULL COMMENT '操作人',
  PRIMARY KEY (`log_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='采购操作记录表';

-- ----------------------------
-- Records of purchase_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for purchase_return
-- ----------------------------
DROP TABLE IF EXISTS `purchase_return`;
CREATE TABLE `purchase_return` (
  `ren_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `return_sn` varchar(128) NOT NULL COMMENT '采购退货单号',
  `purchase_id` int(11) unsigned NOT NULL COMMENT '采购id',
  `producer_id` int(11) NOT NULL COMMENT '供应商',
  `producer_name` varchar(255) NOT NULL DEFAULT '' COMMENT '供应商名称',
  `warehouse_id` int(11) unsigned NOT NULL COMMENT '退货仓库',
  `type` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '退货类型，0退货退钱，10退钱不退货，20缺货退钱',
  `money` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '退款金额',
  `is_pay` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '收付状态',
  `check_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '审核状态',
  `express_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '快递id',
  `logistics_name` varchar(128) NOT NULL DEFAULT '' COMMENT '快递公司',
  `logistics_price` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '需要支付的运费',
  `track_num` varchar(128) NOT NULL DEFAULT '' COMMENT '追踪号',
  `is_auto` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否自动生成，1系统生成，0手动生成',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '退货状态，0待处理，10占用库存，20待出库，30已出库，40已签收，50取消，60无需发货',
  `desc` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '退货原因',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`ren_id`) USING BTREE,
  UNIQUE KEY `purchase_return_sn` (`return_sn`) USING BTREE,
  KEY `purchase_return_track_num` (`track_num`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='采购退款记录';

-- ----------------------------
-- Records of purchase_return
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for purchase_terp_info
-- ----------------------------
DROP TABLE IF EXISTS `purchase_terp_info`;
CREATE TABLE `purchase_terp_info` (
  `info_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `purchase_id` int(11) unsigned NOT NULL COMMENT '采购id',
  `id_type` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'id类型',
  `ref_id` int(11) unsigned NOT NULL COMMENT '业务id',
  `store_id` int(11) unsigned NOT NULL COMMENT '商品id',
  `name_ch` varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称',
  `sku` varchar(255) NOT NULL COMMENT '商品sku',
  `qty` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT '数量',
  `price` decimal(15,4) unsigned NOT NULL COMMENT '商品单价',
  `act_money` decimal(15,4) NOT NULL DEFAULT '0.0000' COMMENT '共金额，负需要付，正需要收',
  `unit` varchar(32) NOT NULL DEFAULT '' COMMENT '货物单位',
  `image_url` varchar(255) NOT NULL DEFAULT '' COMMENT '图片路径',
  `cost_desc` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '费用说明',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`info_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='采购退货换货流明细';

-- ----------------------------
-- Records of purchase_terp_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for purchase_track
-- ----------------------------
DROP TABLE IF EXISTS `purchase_track`;
CREATE TABLE `purchase_track` (
  `track_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `purchase_id` int(11) unsigned NOT NULL COMMENT '采购id',
  `express_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '快递id',
  `logistics_name` varchar(255) NOT NULL DEFAULT '' COMMENT '物流商名称',
  `track_status` smallint(3) unsigned NOT NULL DEFAULT '200' COMMENT '物流状态',
  `track_num` varchar(32) NOT NULL DEFAULT '' COMMENT '追踪号',
  `track_info` text COMMENT '物流信息',
  `pay_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '1自付，0供应商付',
  `is_recv` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否收货，1已收货，0未收货',
  `recv_date` datetime DEFAULT NULL COMMENT '收货时间',
  `recv_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '收货人',
  `weight` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '包裹重量g',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`track_id`) USING BTREE,
  KEY `purchase_track_num` (`track_num`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='采购单追踪号';

-- ----------------------------
-- Records of purchase_track
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for report_order_day
-- ----------------------------
DROP TABLE IF EXISTS `report_order_day`;
CREATE TABLE `report_order_day` (
  `day_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `ref_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '订单字段',
  `ref_value` varchar(255) NOT NULL DEFAULT '' COMMENT '字段值',
  `total_price` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '一天总销售额',
  `qty` mediumint(8) NOT NULL DEFAULT '0' COMMENT '一天总销售数量',
  `stat_date` date NOT NULL COMMENT '统计时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`day_id`) USING BTREE,
  KEY `report_order_ref_value` (`ref_value`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22793 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='统计订单sku销量';

-- ----------------------------
-- Records of report_order_day
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_attachment
-- ----------------------------
DROP TABLE IF EXISTS `sys_attachment`;
CREATE TABLE `sys_attachment` (
  `attach_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `id_type` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'id类型',
  `ref_id` int(11) NOT NULL COMMENT '业务id',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
  `md5_code` char(32) NOT NULL DEFAULT '' COMMENT '文件md5码',
  `path` varchar(255) NOT NULL DEFAULT '' COMMENT '路径',
  `type` tinyint(2) unsigned NOT NULL COMMENT '附件类型，0合同，10发票, 20其它',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) DEFAULT '0' COMMENT '创建人',
  PRIMARY KEY (`attach_id`) USING BTREE,
  UNIQUE KEY `attachment_md5_code` (`md5_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='附件表';

-- ----------------------------
-- Records of sys_attachment
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '配置ID',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '配置类型',
  `title` varchar(50) NOT NULL DEFAULT '' COMMENT '配置说明',
  `name` varchar(30) NOT NULL DEFAULT '' COMMENT '配置名称',
  `value` text COMMENT '配置值',
  `group` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '配置分组',
  `extra` varchar(522) NOT NULL DEFAULT '' COMMENT '配置值',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `lock` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  `sort` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `remark` varchar(100) NOT NULL DEFAULT '' COMMENT '配置说明',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_name` (`name`) USING BTREE,
  KEY `type` (`type`) USING BTREE,
  KEY `group` (`group`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='系统配置表';

-- ----------------------------
-- Records of sys_config
-- ----------------------------
BEGIN;
INSERT INTO `sys_config` VALUES (7, 2, '后台允许访问IP', 'admin_allow_ip', '', 0, '', '2021-01-11 10:16:02', '2021-01-11 10:16:02', 0, 0, '多个用逗号分隔，如果不配置表示不限制IP访问');
INSERT INTO `sys_config` VALUES (8, 3, '配置分组', 'config_group_list', '1:基本\r\n3:业务\r\n5:Api\r\n6:企业', 0, '', '2021-01-11 10:16:02', '2021-01-11 10:16:02', 0, 0, '配置分组');
INSERT INTO `sys_config` VALUES (9, 3, '不受限控制器方法', 'allow_visit', '0:/admin/index/index', 0, '', '2021-01-11 10:16:02', '2021-01-11 10:16:02', 0, 0, '');
INSERT INTO `sys_config` VALUES (10, 3, '配置类型列表', 'config_type_list', '0:数字\r\n1:字符\r\n2:文本\r\n3:数组\r\n4:枚举', 4, '', '2021-01-11 10:16:02', '2021-01-11 10:16:02', 0, 0, '主要用于数据解析和页面表单的生成');
INSERT INTO `sys_config` VALUES (13, 1, 'token过期时间', 'token_expiration_date', '604800', 5, '', '2021-01-11 10:16:02', '2021-01-11 10:16:02', 0, 0, '单位：秒，0表示用不过期');
INSERT INTO `sys_config` VALUES (15, 1, '短信模板', 'sms_template', '【LMT-ERP】您的验证码是{code}，请在5分钟内填写。', 5, '', '2021-01-11 10:16:02', '2021-01-11 10:16:02', 0, 6, '用于配置注册和找回密码时发送短信的模板，{code}为验证码。');
INSERT INTO `sys_config` VALUES (16, 3, 'swoole允许访问IP', 'swoole_allow_ip', '129.168.1.1\r\n129.168.1.2\r\n129.168.1.3\r\n129.168.1.4', 3, '', '2021-01-11 10:16:02', '2021-01-11 10:16:02', 0, 45, '');
INSERT INTO `sys_config` VALUES (18, 0, '采购税', 'purchase_tax', '0.17', 1, '国内采购税', '2021-01-11 10:16:02', '2021-01-11 10:16:02', 0, 0, '');
INSERT INTO `sys_config` VALUES (19, 0, '采购自动生成付款单', 'purchase_auto_payment', '0', 1, '', '2021-01-11 10:16:02', '2021-01-11 10:16:02', 0, 0, '');
INSERT INTO `sys_config` VALUES (20, 1, '51track密钥', '51track_api_key', '', 6, '', '2021-01-26 10:15:39', '2021-01-26 10:15:39', 0, 0, '');
INSERT INTO `sys_config` VALUES (21, 1, '快递100密钥', 'kuaidi100_api_key', '', 6, '', '2021-02-04 11:54:24', '2021-02-04 11:54:24', 0, 0, '');
INSERT INTO `sys_config` VALUES (22, 1, '快递100客户码', 'kuaidi100_api_customer', '', 6, '', '2021-02-04 11:55:27', '2021-02-04 11:55:27', 0, 0, '');
INSERT INTO `sys_config` VALUES (23, 0, '订单重量偏移', 'weight_offset', '100', 1, '订单出库可偏移重量g', '2021-02-22 13:15:56', '2021-02-22 13:15:56', 0, 0, '');
INSERT INTO `sys_config` VALUES (24, 0, 'Api请示尝试次数', 'api_attempts', '5', 1, '', '2021-02-23 22:29:35', '2021-02-23 22:29:35', 0, 0, '');
INSERT INTO `sys_config` VALUES (25, 1, 'SMTP服务地址', 'email_host', 'smtp.163.com', 6, '', '2021-02-04 11:54:24', '2021-02-04 11:54:24', 0, 0, '');
INSERT INTO `sys_config` VALUES (26, 1, '邮箱用户名', 'email_username', '', 6, '', '2021-02-04 11:55:27', '2021-02-04 11:55:27', 0, 0, '');
INSERT INTO `sys_config` VALUES (27, 1, '邮箱密码', 'email_password', '', 6, '', '2021-02-04 11:55:27', '2021-02-04 11:55:27', 0, 0, '');
INSERT INTO `sys_config` VALUES (28, 1, '邮箱端口', 'email_port', '465', 6, '', '2021-02-04 11:55:27', '2021-02-04 11:55:27', 0, 0, '');
INSERT INTO `sys_config` VALUES (29, 1, '拣货单默认数', 'pick_default_qty', '100', 6, '每个拣货单上有多少个订单', '2021-07-19 15:45:05', '2021-07-19 15:45:05', 1, 0, '');
COMMIT;

-- ----------------------------
-- Table structure for sys_countries
-- ----------------------------
DROP TABLE IF EXISTS `sys_countries`;
CREATE TABLE `sys_countries` (
  `country_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `name_en` varchar(128) NOT NULL DEFAULT '' COMMENT '英文名称',
  `name_ch` varchar(128) NOT NULL DEFAULT '' COMMENT '中文名称',
  `code_two` char(2) NOT NULL DEFAULT '' COMMENT '二字简码',
  `code_three` char(3) NOT NULL DEFAULT '' COMMENT '三字简码',
  `num_code` char(3) NOT NULL DEFAULT '' COMMENT '数字代码',
  `currency_code` varchar(64) NOT NULL DEFAULT '' COMMENT '币种代码',
  `tax_rate` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '税率百分比',
  `currency_name` varchar(255) NOT NULL DEFAULT '' COMMENT '币种名称',
  `continent_en` varchar(255) NOT NULL DEFAULT '' COMMENT '国家所在洲英文',
  `continent_ch` varchar(255) NOT NULL DEFAULT '' COMMENT '国家所在洲中文',
  `sort` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`country_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=254 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='国家表';

-- ----------------------------
-- Records of sys_countries
-- ----------------------------
BEGIN;
INSERT INTO `sys_countries` VALUES (1, 'Afghanistan', '阿富汗', 'AF', 'AFG', '004', 'AFN', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (2, 'Albania', '阿尔巴尼亚', 'AL', 'ALB', '008', 'ALL', 0, '阿尔尼亚列克', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (3, 'Algeria', '阿尔及利亚', 'DZ', 'DZA', '012', 'DZD', 0, '阿尔及利亚第纳', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (4, 'American Samoa', '美属萨摩亚群岛', 'AS', 'ASM', '016', 'USD', 0, '美元', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (5, 'Andorra', '安道尔', 'AD', 'AND', '020', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (6, 'Angola', '安哥拉', 'AO', 'AGO', '024', 'AOA', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (7, 'Anguilla', '安圭拉岛', 'AI', 'AIA', '660', 'XCD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (8, 'Antarctica', '', 'AQ', 'ATA', '010', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (9, 'Antigua and Barbuda', '安提瓜及巴布达', 'AG', 'ATG', '028', 'XCD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (10, 'Argentina', '阿根廷', 'AR', 'ARG', '032', 'ARS', 0, '', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (11, 'Armenia', '亚美尼亚', 'AM', 'ARM', '051', 'AMD', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (12, 'Aruba', '阿鲁巴岛', 'AW', 'ABW', '533', 'AWG', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (13, 'Australia', '澳大利亚', 'AU', 'AUS', '036', 'AUD', 0, '澳大利亚元', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (14, 'Austria', '奥地利', 'AT', 'AUT', '040', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (15, 'Azerbaijan', '阿塞拜疆', 'AZ', 'AZE', '031', 'AZN', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (16, 'Bahamas', '巴哈马', 'BS', 'BHS', '044', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (17, 'Bahrain', '巴林', 'BH', 'BHR', '048', 'BHD', 0, '巴林第纳尔', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (18, 'Bangladesh', '孟加拉国', 'BD', 'BGD', '050', 'BDT', 0, '孟加拉国塔卡', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (19, 'Barbados', '巴巴多斯', 'BB', 'BRB', '052', 'BBD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (20, 'Belarus', '白俄罗斯', 'BY', 'BLR', '112', 'BYN', 0, '', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (21, 'Belgium', '比利时', 'BE', 'BEL', '056', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (22, 'Belize', '伯利兹', 'BZ', 'BLZ', '084', 'BZD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (23, 'Benin', '贝宁', 'BJ', 'BEN', '204', 'XOF', 0, '西非共同体法郎', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (24, 'Bermuda', '百慕大', 'BM', 'BMU', '060', 'BMD', 0, '', 'Northern America', '北美洲', 0);
INSERT INTO `sys_countries` VALUES (25, 'Bhutan', '不丹', 'BT', 'BTN', '064', 'INR', 0, '印度罗比', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (26, 'Bolivia', '波利维亚', 'BO', 'BOL', '068', '', 0, '', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (27, 'Bosnia and Herzegowina', '波斯尼亚-黑塞哥维那共和国', 'BA', 'BIH', '070', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (28, 'Botswana', '博茨瓦纳', 'BW', 'BWA', '072', 'BWP', 0, '博茨瓦纳普拉', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (29, 'Bouvet Island', '', 'BV', 'BVT', '074', 'NOK', 0, '挪威克朗', '', '', 0);
INSERT INTO `sys_countries` VALUES (30, 'Brazil', '巴西', 'BR', 'BRA', '076', 'BRL', 0, '巴西里亚尔', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (31, 'British Indian Ocean Territory', '英属印度洋地区', 'IO', 'IOT', '086', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (32, 'Brunei Darussalam', '文莱', 'BN', 'BRN', '096', 'BND', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (33, 'Bulgaria', '保加利亚', 'BG', 'BGR', '100', 'BGN', 0, '保加利亞列弗', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (34, 'Burkina Faso', '布基纳法索', 'BF', 'BFA', '854', 'XOF', 0, '西非共同体法郎', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (35, 'Burundi', '布隆迪', 'BI', 'BDI', '108', 'BIF', 0, '布隆迪法郎', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (36, 'Cambodia', '柬埔寨', 'KH', 'KHM', '116', 'KHR', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (37, 'Cameroon', '喀麦隆', 'CM', 'CMR', '120', 'XAF', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (38, 'Canada', '加拿大', 'CA', 'CAN', '124', 'CAD', 0, '加拿大元', 'Northern America', '北美洲', 0);
INSERT INTO `sys_countries` VALUES (39, 'Cape Verde', '佛得角群岛', 'CV', 'CPV', '132', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (40, 'Cayman Islands', '开曼群岛', 'KY', 'CYM', '136', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (41, 'Central African Republic', '中非共和国', 'CF', 'CAF', '140', '', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (42, 'Chad', '乍得', 'TD', 'TCD', '148', 'XAF', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (43, 'Chile', '智利', 'CL', 'CHL', '152', 'CLP', 0, '', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (44, 'China', '中国', 'CN', 'CHN', '156', 'CNY', 0, '人民币', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (45, 'Christmas Island', '圣诞岛', 'CX', 'CXR', '162', 'AUD', 0, '澳大利亚元', '', '', 0);
INSERT INTO `sys_countries` VALUES (46, 'Cocos (Keeling) Islands', '科科斯群岛', 'CC', 'CCK', '166', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (47, 'Colombia', '哥伦比亚', 'CO', 'COL', '170', 'COU', 0, '', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (48, 'Comoros', '科摩罗', 'KM', 'COM', '174', '', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (49, 'Congo', '刚果', 'CG', 'COG', '178', '', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (50, 'Cook Islands', '库克群岛', 'CK', 'COK', '184', '', 0, '', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (51, 'Costa Rica', '哥斯达黎加', 'CR', 'CRI', '188', 'CRC', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (52, 'Cote D\'Ivoire', '科特迪瓦(象牙海岸)', 'CI', 'CIV', '384', 'XOF', 0, '西非共同体法郎', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (53, 'Croatia', '克罗地亚', 'HR', 'HRV', '191', 'HRK', 0, '', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (54, 'Cuba', '古巴', 'CU', 'CUB', '192', 'CUP', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (55, 'Cyprus', '塞浦路斯', 'CY', 'CYP', '196', 'EUR', 0, '欧元', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (56, 'Czech Republic', '捷克', 'CZ', 'CZE', '203', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (57, 'Denmark', '丹麦', 'DK', 'DNK', '208', 'DKK', 0, '丹麦克朗', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (58, 'Djibouti', '吉布提', 'DJ', 'DJI', '262', 'DJF', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (59, 'Dominica', '多米尼克', 'DM', 'DMA', '212', 'XCD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (60, 'Dominican Republic', '多米尼加共和国', 'DO', 'DOM', '214', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (61, 'Timor-Leste', '', 'TL', 'TLS', '626', 'USD', 0, '美元', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (62, 'Ecuador', '厄瓜多尔', 'EC', 'ECU', '218', 'USD', 0, '美元', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (63, 'Egypt', '埃及', 'EG', 'EGY', '818', 'EGP', 0, '埃及镑', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (64, 'El Salvador', '萨尔瓦多', 'SV', 'SLV', '222', 'USD', 0, '美元', '', '', 0);
INSERT INTO `sys_countries` VALUES (65, 'Equatorial Guinea', '赤道几内亚', 'GQ', 'GNQ', '226', 'XAF', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (66, 'Eritrea', '厄立特里亚', 'ER', 'ERI', '232', 'ERN', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (67, 'Estonia', '爱沙尼亚', 'EE', 'EST', '233', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (68, 'Ethiopia', '埃塞俄比亚', 'ET', 'ETH', '231', 'ETB', 0, '埃塞俄比亚比尔', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (69, 'Falkland Islands (Malvinas)', '福克兰群岛', 'FK', 'FLK', '238', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (70, 'Faroe Islands', '法鲁群岛', 'FO', 'FRO', '234', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (71, 'Fiji', '斐济', 'FJ', 'FJI', '242', 'FJD', 0, '', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (72, 'Finland', '芬兰', 'FI', 'FIN', '246', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (73, 'France', '法国', 'FR', 'FRA', '250', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (75, 'French Guiana', '法属圭亚那', 'GF', 'GUF', '254', 'EUR', 0, '欧元', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (76, 'French Polynesia', '塔希堤', 'PF', 'PYF', '258', 'XPF', 0, '', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (77, 'French Southern Territories', '', 'TF', 'ATF', '260', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (78, 'Gabon', '加蓬', 'GA', 'GAB', '266', 'XAF', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (79, 'Gambia', '冈比亚', 'GM', 'GMB', '270', '', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (80, 'Georgia', '格鲁吉亚', 'GE', 'GEO', '268', 'GEL', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (81, 'Germany', '德国', 'DE', 'DEU', '276', 'EUR', 16, '欧元', 'Europe', '欧洲', 100);
INSERT INTO `sys_countries` VALUES (82, 'Ghana', '加纳', 'GH', 'GHA', '288', 'GHS', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (83, 'Gibraltar', '直布罗陀', 'GI', 'GIB', '292', 'GIP', 0, '', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (84, 'Greece', '希腊', 'GR', 'GRC', '300', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (85, 'Greenland', '格陵兰', 'GL', 'GRL', '304', 'DKK', 0, '丹麦克朗', 'Northern America', '北美洲', 0);
INSERT INTO `sys_countries` VALUES (86, 'Grenada', '格林纳达', 'GD', 'GRD', '308', 'XCD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (87, 'Guadeloupe', '瓜德罗普', 'GP', 'GLP', '312', 'EUR', 0, '欧元', '', '', 0);
INSERT INTO `sys_countries` VALUES (88, 'Guam', '', 'GU', 'GUM', '316', 'USD', 0, '美元', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (89, 'Guatemala', '危地马拉', 'GT', 'GTM', '320', 'GTQ', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (90, 'Guinea', '几内亚', 'GN', 'GIN', '324', 'GNF', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (91, 'Guinea-bissau', '几内亚比绍', 'GW', 'GNB', '624', 'XOF', 0, '西非共同体法郎', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (92, 'Guyana', '圭亚那', 'GY', 'GUY', '328', 'GYD', 0, '', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (93, 'Haiti', '海地', 'HT', 'HTI', '332', 'USD', 0, '美元', '', '', 0);
INSERT INTO `sys_countries` VALUES (94, 'Heard and Mc Donald Islands', '', 'HM', 'HMD', '334', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (95, 'Honduras', '洪都拉斯', 'HN', 'HND', '340', 'HNL', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (96, 'Hong Kong', '香港', 'HK', 'HKG', '344', 'HKD', 0, '港币', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (97, 'Hungary', '匈牙利', 'HU', 'HUN', '348', 'HUF', 0, '匈牙利福林', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (98, 'Iceland', '冰岛', 'IS', 'ISL', '352', 'ISK', 0, '', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (99, 'India', '印度', 'IN', 'IND', '356', 'INR', 0, '印度罗比', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (100, 'Indonesia', '印度尼西亚', 'ID', 'IDN', '360', 'IDR', 0, '印度尼西亚卢比', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (101, 'Iran (Islamic Republic of)', '伊朗', 'IR', 'IRN', '364', 'IRR', 0, '伊朗里亚尔', '', '', 0);
INSERT INTO `sys_countries` VALUES (102, 'Iraq', '伊拉克', 'IQ', 'IRQ', '368', 'IQD', 0, '伊拉克地纳尔', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (103, 'Ireland', '爱尔兰', 'IE', 'IRL', '372', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (104, 'Israel', '以色列', 'IL', 'ISR', '376', 'ILS', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (105, 'Italy', '意大利', 'IT', 'ITA', '380', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (106, 'Jamaica', '牙买加', 'JM', 'JAM', '388', 'JMD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (107, 'Japan', '日本', 'JP', 'JPN', '392', 'JPY', 0, '日元', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (108, 'Jordan', '约旦', 'JO', 'JOR', '400', 'JOD', 0, '约旦第纳尔', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (109, 'Kazakhstan', '哈萨克斯坦', 'KZ', 'KAZ', '398', 'KZT', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (110, 'Kenya', '肯尼亚', 'KE', 'KEN', '404', 'KES', 0, '肯尼亚先令', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (111, 'Kiribati', '基利巴斯共和国', 'KI', 'KIR', '296', 'AUD', 0, '澳大利亚元', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (112, 'Korea, Democratic People\'s Republic of', '朝鲜', 'KP', 'PRK', '408', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (113, 'Korea, Republic of', '韩国', 'KR', 'KOR', '410', 'KRW', 0, '韩元', 'Asia', '', 0);
INSERT INTO `sys_countries` VALUES (114, 'Kuwait', '科威特', 'KW', 'KWT', '414', 'KWD', 0, '科威特第纳尔', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (115, 'Kyrgyzstan', '吉尔吉斯斯坦', 'KG', 'KGZ', '417', 'KGS', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (116, 'Lao People\'s Democratic Republic', '老挝', 'LA', 'LAO', '418', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (117, 'Latvia', '拉脱维亚', 'LV', 'LVA', '428', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (118, 'Lebanon', '黎巴嫩', 'LB', 'LBN', '422', 'LBP', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (119, 'Lesotho', '莱索托', 'LS', 'LSO', '426', 'ZAR', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (120, 'Liberia', '利比里亚', 'LR', 'LBR', '430', 'LRD', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (121, 'Libyan Arab Jamahiriya', '利比亚', 'LY', 'LBY', '434', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (122, 'Liechtenstein', '列支敦士登', 'LI', 'LIE', '438', 'CHF', 0, '瑞士法郎', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (123, 'Lithuania', '立陶宛', 'LT', 'LTU', '440', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (124, 'Luxembourg', '卢森堡', 'LU', 'LUX', '442', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (125, 'Macao', '', 'MO', 'MAC', '446', 'MOP', 0, '澳门币', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (126, 'Macedonia, The Former Yugoslav Republic of', '马其顿', 'MK', 'MKD', '807', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (127, 'Madagascar', '马达加斯加', 'MG', 'MDG', '450', 'MGA', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (128, 'Malawi', '马拉维', 'MW', 'MWI', '454', 'MWK', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (129, 'Malaysia', '马来西亚', 'MY', 'MYS', '458', 'MYR', 0, '马币', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (130, 'Maldives', '马尔代夫', 'MV', 'MDV', '462', 'MVR', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (131, 'Mali', '马里', 'ML', 'MLI', '466', 'XOF', 0, '西非共同体法郎', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (132, 'Malta', '马耳他', 'MT', 'MLT', '470', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (133, 'Marshall Islands', '马绍尔群岛', 'MH', 'MHL', '584', '', 0, '', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (134, 'Martinique', '马提尼克', 'MQ', 'MTQ', '474', 'EUR', 0, '欧元', '', '', 0);
INSERT INTO `sys_countries` VALUES (135, 'Mauritania', '毛里塔尼亚', 'MR', 'MRT', '478', 'MRU', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (136, 'Mauritius', '毛里求斯', 'MU', 'MUS', '480', 'MUR', 0, '毛里求斯卢比', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (137, 'Mayotte', '', 'YT', 'MYT', '175', 'EUR', 0, '欧元', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (138, 'Mexico', '墨西哥', 'MX', 'MEX', '484', 'MXV', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (139, 'Micronesia, Federated States of', '', 'FM', 'FSM', '583', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (140, 'Moldova', '摩尔多瓦', 'MD', 'MDA', '498', '', 0, '', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (141, 'Monaco', '摩纳哥', 'MC', 'MCO', '492', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (142, 'Mongolia', '蒙古', 'MN', 'MNG', '496', 'MNT', 0, '蒙古图格里克', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (143, 'Montserrat', '蒙特塞拉特岛', 'MS', 'MSR', '500', 'XCD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (144, 'Morocco', '摩洛哥', 'MA', 'MAR', '504', 'MAD', 0, '摩洛哥地拉姆', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (145, 'Mozambique', '莫桑比克', 'MZ', 'MOZ', '508', 'MZN', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (146, 'Myanmar', '缅甸', 'MM', 'MMR', '104', 'MMK', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (147, 'Namibia', '纳米比亚', 'NA', 'NAM', '516', 'ZAR', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (148, 'Nauru', '瑙鲁共和国', 'NR', 'NRU', '520', 'AUD', 0, '澳大利亚元', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (149, 'Nepal', '尼泊尔', 'NP', 'NPL', '524', 'NPR', 0, '尼泊尔卢比', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (150, 'Netherlands', '荷兰', 'NL', 'NLD', '528', '', 0, '', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (151, 'Netherlands Antilles', '', 'AN', 'ANT', '', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (152, 'New Caledonia', '', 'NC', 'NCL', '540', 'XPF', 0, '', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (153, 'New Zealand', '新西兰', 'NZ', 'NZL', '554', 'NZD', 0, '新西兰元', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (154, 'Nicaragua', '尼加拉瓜', 'NI', 'NIC', '558', 'NIO', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (155, 'Niger', '尼日尔', 'NE', 'NER', '562', '', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (156, 'Nigeria', '尼日利亚', 'NG', 'NGA', '566', 'NGN', 0, '尼日利亚奈拉', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (157, 'Niue', '纽埃岛', 'NU', 'NIU', '570', 'NZD', 0, '新西兰元', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (158, 'Norfolk Island', '诺褔克岛', 'NF', 'NFK', '574', 'AUD', 0, '澳大利亚元', '', '', 0);
INSERT INTO `sys_countries` VALUES (159, 'Northern Mariana Islands', '塞班岛（北马里亚纳群岛）', 'MP', 'MNP', '580', '', 0, '', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (160, 'Norway', '挪威', 'NO', 'NOR', '578', 'NOK', 0, '挪威克朗', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (161, 'Oman', '阿曼', 'OM', 'OMN', '512', 'OMR', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (162, 'Pakistan', '巴基斯坦', 'PK', 'PAK', '586', 'PKR', 0, '巴基斯坦卢比', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (163, 'Palau', '帕劳', 'PW', 'PLW', '585', 'USD', 0, '美元', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (164, 'Panama', '巴拿马', 'PA', 'PAN', '591', 'USD', 0, '美元', '', '', 0);
INSERT INTO `sys_countries` VALUES (165, 'Papua New Guinea', '巴布亚新几内亚', 'PG', 'PNG', '598', 'PGK', 0, '巴布亚新基那', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (166, 'Paraguay', '巴拉圭', 'PY', 'PRY', '600', 'PYG', 0, '', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (167, 'Peru', '秘鲁', 'PE', 'PER', '604', 'PEN', 0, '', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (168, 'Philippines', '菲律宾', 'PH', 'PHL', '608', 'PHP', 0, '菲律宾比索', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (169, 'Pitcairn', '皮特凯恩群岛', 'PN', 'PCN', '612', 'NZD', 0, '新西兰元', '', '', 0);
INSERT INTO `sys_countries` VALUES (170, 'Poland', '波兰', 'PL', 'POL', '616', 'PLN', 0, '', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (171, 'Portugal', '葡萄牙', 'PT', 'PRT', '620', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (172, 'Puerto Rico', '波多黎各', 'PR', 'PRI', '630', 'USD', 0, '美元', '', '', 0);
INSERT INTO `sys_countries` VALUES (173, 'Qatar', '卡塔尔', 'QA', 'QAT', '634', 'QAR', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (174, 'Reunion', '留尼汪岛', 'RE', 'REU', '638', 'EUR', 0, '欧元', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (175, 'Romania', '罗马尼亚', 'RO', 'ROU', '642', 'RON', 0, '', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (176, 'Russian Federation', '俄罗斯', 'RU', 'RUS', '643', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (177, 'Rwanda', '卢旺达', 'RW', 'RWA', '646', 'RWF', 0, '卢旺达法郎', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (178, 'Saint Kitts and Nevis', '圣基茨和尼维斯', 'KN', 'KNA', '659', 'XCD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (179, 'Saint Lucia', '圣卢西亚', 'LC', 'LCA', '662', 'XCD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (180, 'Saint Vincent and the Grenadines', '圣文森特和格林纳丁斯岛', 'VC', 'VCT', '670', 'XCD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (181, 'Samoa', '西萨摩亚', 'WS', 'WSM', '882', 'WST', 0, '', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (182, 'San Marino', '圣马力诺', 'SM', 'SMR', '674', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (183, 'Sao Tome and Principe', '圣多美和普林西比', 'ST', 'STP', '678', 'STN', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (184, 'Saudi Arabia', '沙特阿拉伯', 'SA', 'SAU', '682', 'SAR', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (185, 'Senegal', '塞内加尔', 'SN', 'SEN', '686', 'XOF', 0, '西非共同体法郎', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (186, 'Seychelles', '塞舌尔', 'SC', 'SYC', '690', 'SCR', 0, '塞舌尔卢比', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (187, 'Sierra Leone', '塞拉利昂', 'SL', 'SLE', '694', 'SLL', 0, '塞拉利昂', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (188, 'Singapore', '新加坡', 'SG', 'SGP', '702', 'SGD', 0, '新加坡元', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (189, 'Slovakia (Slovak Republic)', '斯洛伐克', 'SK', 'SVK', '703', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (190, 'Slovenia', '斯洛文尼亚', 'SI', 'SVN', '705', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (191, 'Solomon Islands', '所罗门群岛', 'SB', 'SLB', '090', 'SBD', 0, '', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (192, 'Somalia', '索马里', 'SO', 'SOM', '706', 'SOS', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (193, 'South Africa', '南非', 'ZA', 'ZAF', '710', 'ZAR', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (194, 'South Georgia and the South Sandwich Islands', '', 'GS', 'SGS', '239', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (195, 'Spain', '西班牙', 'ES', 'ESP', '724', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (196, 'Sri Lanka', '斯里兰卡', 'LK', 'LKA', '144', 'LKR', 0, '斯里兰卡卢比', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (197, 'St. Helena', '圣赫勒拿岛', 'SH', 'SHN', '654', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (198, 'Saint Pierre and Miquelon', '圣皮埃尔和密克隆群岛', 'PM', 'SPM', '666', '', 0, '', 'Northern America', '北美洲', 0);
INSERT INTO `sys_countries` VALUES (199, 'Sudan', '苏丹', 'SD', 'SDN', '729', '', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (200, 'Suriname', '苏里南', 'SR', 'SUR', '740', 'SRD', 0, '', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (201, 'Svalbard and Jan Mayen Islands', '', 'SJ', 'SJM', '744', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (202, 'Swaziland', '斯威士兰', 'SZ', 'SWZ', '748', 'SZL', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (203, 'Sweden', '瑞典', 'SE', 'SWE', '752', 'SEK', 0, '瑞典克朗', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (204, 'Switzerland', '瑞士', 'CH', 'CHE', '756', 'CHW', 0, '', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (205, 'Syrian Arab Republic', '叙利亚', 'SY', 'SYR', '760', 'SYP', 0, '叙利亚镑', '', '', 0);
INSERT INTO `sys_countries` VALUES (206, 'Taiwan', '台湾', 'TW', 'TWN', '158', '', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (207, 'Tajikistan', '塔吉克斯坦', 'TJ', 'TJK', '762', 'TJS', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (208, 'Tanzania, United Republic of', '坦桑尼亚', 'TZ', 'TZA', '834', 'TZS', 0, '坦桑尼亚先令', '', '', 0);
INSERT INTO `sys_countries` VALUES (209, 'Thailand', '泰国', 'TH', 'THA', '764', 'THB', 0, '泰币', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (210, 'Togo', '多哥', 'TG', 'TGO', '768', 'XOF', 0, '西非共同体法郎', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (211, 'Tokelau', '托克劳', 'TK', 'TKL', '772', 'NZD', 0, '新西兰元', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (212, 'Tonga', '汤加', 'TO', 'TON', '776', 'TOP', 0, '', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (213, 'Trinidad and Tobago', '特立尼达和多巴哥', 'TT', 'TTO', '780', 'TTD', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (214, 'Tunisia', '突尼斯', 'TN', 'TUN', '788', 'TND', 0, '突尼斯第纳尔', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (215, 'Turkey', '土耳其', 'TR', 'TUR', '792', 'TRY', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (216, 'Turkmenistan', '土库曼斯坦', 'TM', 'TKM', '795', 'TMT', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (217, 'Turks and Caicos Islands', '特克斯和凯科斯群岛', 'TC', 'TCA', '796', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (218, 'Tuvalu', '图瓦卢', 'TV', 'TUV', '798', 'AUD', 0, '澳大利亚元', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (219, 'Uganda', '乌干达', 'UG', 'UGA', '800', 'UGX', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (220, 'Ukraine', '乌克兰', 'UA', 'UKR', '804', 'UAH', 0, '', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (221, 'United Arab Emirates', '阿拉伯联合酋长国', 'AE', 'ARE', '784', '', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (222, 'United Kingdom', '英国', 'GB', 'GBR', '826', 'GBP', 0, '英镑', 'Europe', '欧洲', 90);
INSERT INTO `sys_countries` VALUES (223, 'United States', '美国', 'US', 'USA', '840', 'USD', 0, '美元', 'Northern America', '北美洲', 80);
INSERT INTO `sys_countries` VALUES (224, 'United States Minor Outlying Islands', '美国本土外小岛屿', 'UM', 'UMI', '581', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (225, 'Uruguay', '乌拉圭', 'UY', 'URY', '858', 'UYU', 0, '', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (226, 'Uzbekistan', '乌兹别克斯坦', 'UZ', 'UZB', '860', 'UZS', 0, '', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (227, 'Vanuatu', '瓦努阿图', 'VU', 'VUT', '548', 'VUV', 0, '', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (228, 'Vatican City State (Holy See)', '梵蒂冈', 'VA', 'VAT', '336', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (229, 'Venezuela', '委内瑞拉', 'VE', 'VEN', '862', '', 0, '', 'South America', '南美洲', 0);
INSERT INTO `sys_countries` VALUES (230, 'Viet Nam', '越南', 'VN', 'VNM', '704', 'VND', 0, '越南盾', '', '', 0);
INSERT INTO `sys_countries` VALUES (231, 'Virgin Islands (British)', '英属维尔京群岛', 'VG', 'VGB', '092', 'USD', 0, '美元', '', '', 0);
INSERT INTO `sys_countries` VALUES (232, 'Virgin Islands (U.S.)', '美属维尔京群岛', 'VI', 'VIR', '850', 'USD', 0, '美元', '', '', 0);
INSERT INTO `sys_countries` VALUES (233, 'Wallis and Futuna Islands', '瓦利斯群岛和富图纳群岛', 'WF', 'WLF', '876', '', 0, '', 'Oceania', '大洋洲', 0);
INSERT INTO `sys_countries` VALUES (234, 'Western Sahara', '西撒哈拉', 'EH', 'ESH', '732', 'MAD', 0, '摩洛哥地拉姆', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (235, 'Yemen', '也门阿拉伯共合国', 'YE', 'YEM', '887', 'YER', 0, '也门里亚尔', 'Asia', '亚洲', 0);
INSERT INTO `sys_countries` VALUES (236, 'Serbia', '塞尔维亚', 'RS', 'SRB', '688', 'RSD', 0, '', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (238, 'Zambia', '赞比亚', 'ZM', 'ZMB', '894', 'ZMW', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (239, 'Zimbabwe', '津巴布韦', 'ZW', 'ZWE', '716', 'ZWL', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (240, 'Aaland Islands', '奥兰群岛', 'AX', 'ALA', '248', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (241, 'Congo (the Democratic Republic of the)', '', 'CD', 'COD', '180', 'CDF', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (242, 'Palestine, State of', '巴勒斯坦', 'PS', 'PSE', '275', '', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (243, 'Montenegro', '黑山共和国', 'ME', 'MNE', '499', 'EUR', 0, '欧元', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (244, 'Curaçao', '', 'CW', 'CUW', '531', 'ANG', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (245, 'Sint Maarten (Dutch part)', '圣马丁', 'SX', 'SXM', '534', 'ANG', 0, '', '', '', 0);
INSERT INTO `sys_countries` VALUES (246, 'Bonaire, Sint Eustatius and Saba', '博内尔', 'BQ', 'BES', '535', 'USD', 0, '美元', '', '', 0);
INSERT INTO `sys_countries` VALUES (247, 'Saint Barthélemy', '圣巴泰勒米', 'BL', 'BLM', '652', 'EUR', 0, '欧元', '', '', 0);
INSERT INTO `sys_countries` VALUES (248, 'Saint Martin (French part)', '圣马丁（法国部分）', 'MF', 'MAF', '663', 'EUR', 0, '欧元', '', '', 0);
INSERT INTO `sys_countries` VALUES (249, 'South Sudan', '', 'SS', 'SSD', '728', 'SSP', 0, '', 'Africa', '非洲', 0);
INSERT INTO `sys_countries` VALUES (250, 'Guernsey', '', 'GG', 'GGY', '831', 'GBP', 0, '英镑', '', '', 0);
INSERT INTO `sys_countries` VALUES (251, 'Jersey', '泽西岛(英属)', 'JE', 'JEY', '832', 'GBP', 0, '英镑', '', '', 0);
INSERT INTO `sys_countries` VALUES (252, 'Isle of Man', '马恩岛', 'IM', 'IMN', '833', 'GBP', 0, '英镑', 'Europe', '欧洲', 0);
INSERT INTO `sys_countries` VALUES (253, 'Vietnam', '越南', 'VN', 'VNM', '', 'VND', 0, '越南盾', 'Asia', '亚洲', 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_exchange
-- ----------------------------
DROP TABLE IF EXISTS `sys_exchange`;
CREATE TABLE `sys_exchange` (
  `exchange_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `source_code` char(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '源转换币种代码',
  `source_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '源转换币种名称',
  `target_code` char(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '目标转换币种代码',
  `target_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '目标转换币种名称',
  `rate` decimal(10,4) unsigned NOT NULL COMMENT '兑换比例',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '汇率更新时间',
  PRIMARY KEY (`exchange_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='汇率表';

-- ----------------------------
-- Records of sys_exchange
-- ----------------------------
BEGIN;
INSERT INTO `sys_exchange` VALUES (1, 'ALL', '阿尔尼亚列克', 'CNY', '人民币', 0.0638, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (2, 'DZD', '阿尔及利亚第纳', 'CNY', '人民币', 0.0520, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (3, 'CNY', '人民币', 'USD', '美金', 0.1478, '2020-09-20 17:28:31');
INSERT INTO `sys_exchange` VALUES (4, 'CNY', '人民币', 'HKD', '港币', 1.1452, '2020-09-20 17:30:29');
INSERT INTO `sys_exchange` VALUES (5, 'AUD', '澳大利亚元', 'CNY', '人民币', 4.8439, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (6, 'BHD', '巴林第纳尔', 'CNY', '人民币', 17.8046, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (7, 'CAD', '加拿大元', 'CNY', '人民币', 1.5000, '2020-09-20 18:06:33');
INSERT INTO `sys_exchange` VALUES (8, 'XOF', '西非共同体法郎', 'CNY', '人民币', 0.0121, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (9, 'INR', '印度罗比', 'CNY', '人民币', 0.0917, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (10, 'BWP', '博茨瓦纳普拉', 'CNY', '人民币', 0.5828, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (11, 'NOK', '挪威克朗', 'CNY', '人民币', 0.7327, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (12, 'BRL', '巴西里亚尔', 'CNY', '人民币', 1.2104, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (13, 'BGN', '保加利亞列弗', 'CNY', '人民币', 4.0488, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (14, 'BIF', '布隆迪法郎', 'CNY', '人民币', 0.0035, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (15, 'CAD', '加拿大元', 'CNY', '人民币', 5.0971, '2020-10-14 21:49:01');
INSERT INTO `sys_exchange` VALUES (16, 'DKK', '丹麦克朗', 'CNY', '人民币', 1.0642, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (17, 'EGP', '埃及镑', 'CNY', '人民币', 0.4263, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (18, 'ETB', '埃塞俄比亚比尔', 'CNY', '人民币', 0.1809, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (19, 'GBP', '英镑', 'CNY', '人民币', 8.7321, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (20, 'HKD', '港币', 'CNY', '人民币', 0.8638, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (21, 'HUF', '匈牙利福林', 'CNY', '人民币', 0.0222, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (22, 'IDR', '印度尼西亚卢比', 'CNY', '人民币', 0.0005, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (23, 'IRR', '伊朗里亚尔', 'CNY', '人民币', 0.0002, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (24, 'IQD', '伊拉克地纳尔', 'CNY', '人民币', 0.0056, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (25, 'JPY', '日元', 'CNY', '人民币', 0.0634, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (26, 'JOD', '约旦第纳尔', 'CNY', '人民币', 9.4422, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (27, 'KES', '肯尼亚先令', 'CNY', '人民币', 0.0616, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (28, 'KRW', '韩元', 'CNY', '人民币', 0.0059, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (29, 'KWD', '科威特第纳尔', 'CNY', '人民币', 21.8684, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (30, 'CHF', '瑞士法郎', 'CNY', '人民币', 7.3599, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (31, 'MOP', '澳门币', 'CNY', '人民币', 0.8386, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (32, 'MYR', '马币', 'CNY', '人民币', 1.6175, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (33, 'MUR', '毛里求斯卢比', 'CNY', '人民币', 0.1685, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (34, 'MNT', '蒙古图格里克', 'CNY', '人民币', 0.0023, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (35, 'MAD', '摩洛哥地拉姆', 'CNY', '人民币', 0.7289, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (36, 'NPR', '尼泊尔卢比', 'CNY', '人民币', 0.0571, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (37, 'NZD', '新西兰元', 'CNY', '人民币', 4.4628, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (38, 'NGN', '尼日利亚奈拉', 'CNY', '人民币', 0.0175, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (39, 'PKR', '巴基斯坦卢比', 'CNY', '人民币', 0.0409, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (40, 'PGK', '巴布亚新基那', 'CNY', '人民币', 1.9137, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (41, 'PHP', '菲律宾比索', 'CNY', '人民币', 0.1384, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (42, 'RWF', '卢旺达法郎', 'CNY', '人民币', 0.0069, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (43, 'SCR', '塞舌尔卢比', 'CNY', '人民币', 0.3699, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (44, 'SLL', '塞拉利昂', 'CNY', '人民币', 0.0007, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (45, 'SGD', '新加坡元', 'CNY', '人民币', 4.9425, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (46, 'LKR', '斯里兰卡卢比', 'CNY', '人民币', 0.0363, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (47, 'SEK', '瑞典克朗', 'CNY', '人民币', 0.7622, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (48, 'SYP', '叙利亚镑', 'CNY', '人民币', 0.0131, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (49, 'TZS', '坦桑尼亚先令', 'CNY', '人民币', 0.0029, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (50, 'THB', '泰币', 'CNY', '人民币', 0.2161, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (51, 'TND', '突尼斯第纳尔', 'CNY', '人民币', 2.4300, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (52, 'VND', '越南盾', 'CNY', '人民币', 0.0003, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (53, 'YER', '也门里亚尔', 'CNY', '人民币', 0.0267, '2020-10-14 21:49:02');
INSERT INTO `sys_exchange` VALUES (54, 'EUR', '欧元', 'CNY', '人民币', 7.8636, '2020-11-28 17:32:33');
INSERT INTO `sys_exchange` VALUES (55, 'USD', '美元', 'CNY', '人民币', 6.4594, '2021-06-22 12:16:05');
COMMIT;

-- ----------------------------
-- Table structure for sys_msg
-- ----------------------------
DROP TABLE IF EXISTS `sys_msg`;
CREATE TABLE `sys_msg` (
  `msg_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `from_id` int(11) unsigned NOT NULL COMMENT '发送者id',
  `to_id` int(10) unsigned NOT NULL COMMENT '接收者id',
  `title` varchar(155) NOT NULL COMMENT '标题',
  `content` varchar(522) NOT NULL DEFAULT '' COMMENT '内容',
  `send_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '发送时间',
  `read_time` datetime DEFAULT NULL COMMENT '阅读时间',
  `is_read` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0未读，1已读',
  PRIMARY KEY (`msg_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='消息表';

-- ----------------------------
-- Records of sys_msg
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_photo
-- ----------------------------
DROP TABLE IF EXISTS `sys_photo`;
CREATE TABLE `sys_photo` (
  `photo_id` int(11) NOT NULL COMMENT '自增id',
  `cate_id` int(11) NOT NULL COMMENT '相册分类',
  `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '图片标题',
  `md5_code` char(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '图片md5码',
  `image_url` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '图片地址',
  `suffix` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '图片后缀',
  `width` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '图片宽度 px',
  `height` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '图片高度 px',
  `size` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '图片大小 kb',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否可用，1是，0否',
  `sort` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  PRIMARY KEY (`photo_id`) USING BTREE,
  KEY `photo_md5_code` (`md5_code`) USING BTREE,
  KEY `photo_path_index` (`image_url`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='相册图片';

-- ----------------------------
-- Records of sys_photo
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_photo_category
-- ----------------------------
DROP TABLE IF EXISTS `sys_photo_category`;
CREATE TABLE `sys_photo_category` (
  `cate_id` int(11) NOT NULL COMMENT '自增id',
  `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父相册分类',
  `name` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '相册名称',
  `sort` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否可用，1是，0否',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  PRIMARY KEY (`cate_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='相册分类';

-- ----------------------------
-- Records of sys_photo_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_queue
-- ----------------------------
DROP TABLE IF EXISTS `sys_queue`;
CREATE TABLE `sys_queue` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `queue` varchar(255) NOT NULL COMMENT '队列名称',
  `payload` longtext NOT NULL COMMENT '队列内容',
  `attempts` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '尝试次数',
  `reserved` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否保留，1是;0否',
  `reserved_at` int(11) unsigned NOT NULL COMMENT '保留时间',
  `available_at` int(11) unsigned NOT NULL COMMENT '可以获取的时间',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='队列表';

-- ----------------------------
-- Records of sys_queue
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_trash
-- ----------------------------
DROP TABLE IF EXISTS `sys_trash`;
CREATE TABLE `sys_trash` (
  `trash_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `tablename` varchar(64) NOT NULL DEFAULT '' COMMENT '表名',
  `id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '被删除表的主键',
  `data` text NOT NULL COMMENT '删除数据序列化',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) unsigned NOT NULL COMMENT '创建人',
  PRIMARY KEY (`trash_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6998 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='回收站';

-- ----------------------------
-- Records of sys_trash
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_uploads
-- ----------------------------
DROP TABLE IF EXISTS `sys_uploads`;
CREATE TABLE `sys_uploads` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `type` char(10) NOT NULL COMMENT '文件类型',
  `ext` varchar(20) DEFAULT NULL COMMENT '文件扩展名',
  `size` int(10) unsigned NOT NULL,
  `path` varchar(64) DEFAULT NULL,
  `filename` varchar(64) NOT NULL,
  `sha1` varchar(64) NOT NULL,
  `width` smallint(5) unsigned NOT NULL DEFAULT '0',
  `height` smallint(5) unsigned NOT NULL DEFAULT '0',
  `mime` varchar(32) DEFAULT NULL,
  `at_time` int(10) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of sys_uploads
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uuid` char(13) NOT NULL DEFAULT '',
  `mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '手机号',
  `nickname` varchar(64) NOT NULL DEFAULT '',
  `openid` varchar(64) NOT NULL DEFAULT '' COMMENT '微信id',
  `token` varchar(64) NOT NULL DEFAULT '',
  `face` varchar(128) NOT NULL DEFAULT '' COMMENT '头像',
  `sex` enum('男','女') DEFAULT NULL,
  `password` varchar(40) NOT NULL DEFAULT '',
  `register_time` datetime NOT NULL COMMENT '注册时间',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for user_token
-- ----------------------------
DROP TABLE IF EXISTS `user_token`;
CREATE TABLE `user_token` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) unsigned NOT NULL COMMENT '用户id',
  `token` varchar(32) NOT NULL COMMENT 'token',
  `ip` char(16) NOT NULL,
  `time` datetime NOT NULL COMMENT '登陆时间',
  `agent` varchar(255) DEFAULT NULL COMMENT 'user_agent',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='记录用户登陆情况';

-- ----------------------------
-- Records of user_token
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for warehouse
-- ----------------------------
DROP TABLE IF EXISTS `warehouse`;
CREATE TABLE `warehouse` (
  `warehouse_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '仓库名称',
  `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '仓库编码',
  `area` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '仓库面积',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用，1启用，0关闭',
  `is_default` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否默认',
  `is_virtual` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否虚拟仓，0不是，1是',
  `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '仓库地址',
  `contacts` varchar(128) NOT NULL DEFAULT '' COMMENT '联系人',
  `phone` varchar(32) NOT NULL DEFAULT '' COMMENT '电话',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`warehouse_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='仓库';

-- ----------------------------
-- Records of warehouse
-- ----------------------------
BEGIN;
INSERT INTO `warehouse` VALUES (1, '一号仓', 'A001', 100, 1, 1, 0, '深圳市龙华区', '龙先生', '130xxxxxxxx', '2020-11-25 21:37:15', '2021-04-03 17:40:06', 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for warehouse_allot
-- ----------------------------
DROP TABLE IF EXISTS `warehouse_allot`;
CREATE TABLE `warehouse_allot` (
  `allot_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `allot_sn` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '调拨单号',
  `out_id` int(11) unsigned NOT NULL COMMENT '调出仓库',
  `in_id` int(11) unsigned NOT NULL COMMENT '调入仓库',
  `user_id` int(11) unsigned NOT NULL COMMENT '申请人',
  `allot_date` date NOT NULL COMMENT '调拨日期',
  `out_date` datetime DEFAULT NULL COMMENT '出库时间',
  `finish_date` datetime DEFAULT NULL COMMENT '完成时间',
  `express_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '快递id',
  `logistics_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '物流商名称',
  `track_num` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '追踪号',
  `track_info` text CHARACTER SET utf8 COLLATE utf8_unicode_ci COMMENT '物流信息',
  `logistics_price` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '物流费用',
  `track_status` smallint(3) unsigned NOT NULL DEFAULT '200' COMMENT '物流状态',
  `status` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '调拨状态：0待调拨，10调拨中，20待上架，30调拨完成，40取消',
  `check_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '审核状态',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`allot_id`) USING BTREE,
  UNIQUE KEY `warehouse_allot_sn` (`allot_sn`) USING BTREE,
  KEY `warehouse_allot_track_num` (`track_num`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='仓库调拨表';

-- ----------------------------
-- Records of warehouse_allot
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for warehouse_area
-- ----------------------------
DROP TABLE IF EXISTS `warehouse_area`;
CREATE TABLE `warehouse_area` (
  `area_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `warehouse_id` int(11) DEFAULT NULL COMMENT '仓库id',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '区域名称',
  `code` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '区域编号',
  `area` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '区域面积',
  `shelf_qty` mediumint(8) unsigned DEFAULT '0' COMMENT '货架数',
  `status` tinyint(2) unsigned DEFAULT NULL COMMENT '状态，1启用，0禁用',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  PRIMARY KEY (`area_id`) USING BTREE,
  UNIQUE KEY `warehouse_area_code` (`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='仓库区域表';

-- ----------------------------
-- Records of warehouse_area
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for warehouse_borrow
-- ----------------------------
DROP TABLE IF EXISTS `warehouse_borrow`;
CREATE TABLE `warehouse_borrow` (
  `borrow_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `out_id` int(11) unsigned NOT NULL COMMENT '借用仓库',
  `in_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '退还仓库',
  `borrow_sn` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '借用单号',
  `borrow_date` date NOT NULL COMMENT '借用日期',
  `out_date` datetime DEFAULT NULL COMMENT '出库时间',
  `return_date` datetime DEFAULT NULL COMMENT '退还时间',
  `user_id` int(11) unsigned NOT NULL COMMENT '申请人',
  `status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '状态，0待出库，10已出库，20部分退还，30全部退还，40待上架，50上架成功，60已取消',
  `check_status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '审核状态',
  `remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`borrow_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商品借用表';

-- ----------------------------
-- Records of warehouse_borrow
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for warehouse_check
-- ----------------------------
DROP TABLE IF EXISTS `warehouse_check`;
CREATE TABLE `warehouse_check` (
  `check_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `warehouse_id` int(11) NOT NULL COMMENT '仓库id',
  `check_sn` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '盘点单号',
  `check_status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '审核状态',
  `check_date` date NOT NULL COMMENT '盘点日期',
  `finish_date` datetime DEFAULT NULL COMMENT '完成日期',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态，1已盘点，0未盘点',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`check_id`) USING BTREE,
  UNIQUE KEY `warehouse_check_sn` (`check_sn`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='仓库盘点表';

-- ----------------------------
-- Records of warehouse_check
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for warehouse_location
-- ----------------------------
DROP TABLE IF EXISTS `warehouse_location`;
CREATE TABLE `warehouse_location` (
  `location_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `warehouse_id` int(11) unsigned NOT NULL COMMENT '仓库',
  `shelf_id` int(11) unsigned NOT NULL COMMENT '货架',
  `code` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '库位编号',
  `floor` tinyint(2) NOT NULL DEFAULT '0' COMMENT '在货架的层级，0不分层级',
  `max_qty` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库位最大可放数量，0不限制',
  `status` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '状态，1可用，0不可用',
  `is_used` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否使用',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  PRIMARY KEY (`location_id`) USING BTREE,
  UNIQUE KEY `warehouse_location_code` (`code`,`warehouse_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='仓库库位表';

-- ----------------------------
-- Records of warehouse_location
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for warehouse_shelf
-- ----------------------------
DROP TABLE IF EXISTS `warehouse_shelf`;
CREATE TABLE `warehouse_shelf` (
  `shelf_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `warehouse_id` int(11) unsigned NOT NULL COMMENT '仓库',
  `area_id` int(11) NOT NULL COMMENT '区域',
  `code` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '货架编号',
  `level` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '货架层数',
  `status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '状态，0可分配，10被占用，20已放满，30可回收，40已回收',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  PRIMARY KEY (`shelf_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='仓库货架表';

-- ----------------------------
-- Records of warehouse_shelf
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for warehouse_stock
-- ----------------------------
DROP TABLE IF EXISTS `warehouse_stock`;
CREATE TABLE `warehouse_stock` (
  `stock_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `warehouse_id` int(11) NOT NULL COMMENT '仓库id',
  `store_id` int(11) unsigned NOT NULL COMMENT '变体id',
  `sku` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'sku',
  `image_url` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '图片地址',
  `total_money` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '总货值',
  `price` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '货物单价',
  `stock` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '现有库存',
  `lock_stock` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '占用库存',
  `purchase_stock` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '采购库存，正途库存',
  `min_stock` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '最小库存预警，如果为0则不需要',
  `max_stock` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '最大库存预警，如果为0则不需要',
  `location_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库位:0没有库位',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用，1可用，0不可用',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`stock_id`) USING BTREE,
  KEY `warehouse_stock_sku` (`sku`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1470 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='库存表';

-- ----------------------------
-- Records of warehouse_stock
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for warehouse_stock_log
-- ----------------------------
DROP TABLE IF EXISTS `warehouse_stock_log`;
CREATE TABLE `warehouse_stock_log` (
  `log_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `user_id` int(11) unsigned NOT NULL COMMENT '业务员id',
  `warehouse_id` int(11) NOT NULL COMMENT '仓库id',
  `store_id` int(11) NOT NULL COMMENT '商品id',
  `sku` varchar(128) NOT NULL DEFAULT '' COMMENT '商品编号',
  `type` tinyint(1) NOT NULL COMMENT '1入库，-1出库，10锁定，20解锁',
  `qty` int(10) NOT NULL COMMENT '操作数量',
  `price` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '单价',
  `before_stock` int(11) unsigned NOT NULL COMMENT '操作前库存',
  `after_stock` int(11) unsigned NOT NULL COMMENT '操作后库存',
  `ref_type` varchar(255) NOT NULL DEFAULT '' COMMENT '业务类型',
  `ref_id_type` varchar(128) NOT NULL COMMENT 'id类型',
  `ref_sn` varchar(255) NOT NULL COMMENT '业务单号',
  `image_url` varchar(1024) NOT NULL DEFAULT '' COMMENT '图片路径',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
  `create_by` int(11) unsigned NOT NULL COMMENT '操作人',
  PRIMARY KEY (`log_id`) USING BTREE,
  KEY `stock_ref_sn` (`ref_sn`) USING BTREE,
  KEY `stock_log_sku` (`sku`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=936 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='仓库出入库记录表';

-- ----------------------------
-- Records of warehouse_stock_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for warehouse_store_status
-- ----------------------------
DROP TABLE IF EXISTS `warehouse_store_status`;
CREATE TABLE `warehouse_store_status` (
  `sid` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '状态名称',
  `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1入库，-1出库',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  `update_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改人',
  PRIMARY KEY (`sid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='库存状态';

-- ----------------------------
-- Records of warehouse_store_status
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for warehouse_terp_info
-- ----------------------------
DROP TABLE IF EXISTS `warehouse_terp_info`;
CREATE TABLE `warehouse_terp_info` (
  `info_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `id_type` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'id类型',
  `ref_id` int(11) NOT NULL COMMENT '业务id',
  `warehouse_id` int(11) unsigned DEFAULT '0' COMMENT '仓库id',
  `store_id` int(11) unsigned NOT NULL COMMENT '商品id',
  `price` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '单价',
  `sku` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '商品编码',
  `image_url` varchar(1024) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '图片路径',
  `qty` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '出库数量',
  `in_qty` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '入库数量',
  `remark` varchar(1024) NOT NULL DEFAULT '' COMMENT '备注信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建人',
  PRIMARY KEY (`info_id`) USING BTREE,
  KEY `warehouse_terp_info_sku` (`sku`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=221 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='仓库调拨明细表';

-- ----------------------------
-- Records of warehouse_terp_info
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
